aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-01-14 20:57:58 +0000
committerJeffrey A Law <law@cygnus.com>1998-01-14 20:57:58 +0000
commitdad4d950760e45552068e6576ea51c48c4dd13f9 (patch)
tree028c0425d9847ebff16ca9566dcf696998e902b9
parent8d0f6504c05f5e369287563cdc71f5788c98e098 (diff)
Bring in final gcc-2.8.0 changes.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@17355 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.11198
-rw-r--r--gcc/INSTALL46
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/cccp.c2
-rw-r--r--gcc/combine.c2
-rw-r--r--gcc/config/arm/arm.c1
-rw-r--r--gcc/config/i386/bsd386.h7
-rw-r--r--gcc/config/m68k/m68k.h6
-rw-r--r--gcc/config/m68k/mot3300.h30
-rw-r--r--gcc/config/m88k/m88k.c8
-rw-r--r--gcc/config/m88k/xm-sysv3.h2
-rw-r--r--gcc/config/mips/mips.h9
-rw-r--r--gcc/config/mips/mips.md12
-rw-r--r--gcc/config/rs6000/rs6000.c6
-rw-r--r--gcc/config/sparc/sparc.c94
-rw-r--r--gcc/config/sparc/sparc.md9
-rw-r--r--gcc/config/svr4.h2
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/method.c8
-rw-r--r--gcc/crtstuff.c4
-rw-r--r--gcc/cse.c2
-rw-r--r--gcc/dwarf2out.c10
-rw-r--r--gcc/dwarfout.c9
-rw-r--r--gcc/expr.c56
-rw-r--r--gcc/extend.texi228
-rw-r--r--gcc/flags.h2
-rw-r--r--gcc/function.c6
-rw-r--r--gcc/gcc.texi4
-rw-r--r--gcc/genattrtab.c2
-rw-r--r--gcc/install.texi55
-rw-r--r--gcc/invoke.texi2
-rw-r--r--gcc/jump.c9
-rw-r--r--gcc/libgcc2.c40
-rw-r--r--gcc/md.texi9
-rw-r--r--gcc/pexecute.c2
-rw-r--r--gcc/sdbout.c8
-rw-r--r--gcc/stmt.c5
-rw-r--r--gcc/toplev.c6
-rw-r--r--gcc/version.c2
39 files changed, 663 insertions, 246 deletions
diff --git a/gcc/ChangeLog.11 b/gcc/ChangeLog.11
index 748764fa33a..108f95a354f 100644
--- a/gcc/ChangeLog.11
+++ b/gcc/ChangeLog.11
@@ -1,7 +1,203 @@
-Sun Dec 14 06:49:05 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+Wed Jan 7 18:02:42 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* Version 2.8.0 released.
+Wed Jan 7 17:54:41 1998 J. Kean Johnston <jkj@sco.com>
+
+ * i386/sco5.h ({END,START}FILE_SPEC): Link with correct crtbegin.o
+ and crtend.o when using -static.
+
+Wed Jan 7 17:49:14 1998 Jan Christiaan van Winkel <Jan.Christiaan.van.Winkel@ATComputing.nl>
+
+ * cppexp.c (gansidecl.h): Include.
+
+Wed Jan 7 17:45:07 1998 Tristan Gingold <gingold@puccini.enst.fr>
+
+ * expr.c (get_push_address): Use copy_to_reg instead of force_operand.
+ (emit_push_insn): Avoid null pointer deference if aggregate has no
+ types.
+ (expand_expr): Avoid finite but useless recursion.
+ (expand_builtin): Fix typo in calling function.
+ * function.c (assign_parms): Avoid useless call to chkr_set_right.
+
+Wed Jan 7 17:31:13 1998 Christian Iseli <Christian.Iseli@lslsun.epfl.ch>
+
+ * combine.c (force_to_mode): Return if operand is a CLOBBER.
+
+Wed Jan 7 17:23:24 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * x-rs6000 (INSTALL): Remove.
+
+ * jump.c (jump_optimize): Don't use a hard reg as an operand
+ of a conditional move if small register classes.
+
+Wed Jan 7 17:09:28 1998 Jim Wilson <wilson@cygnus.com>
+
+ * cse.c (max_insn_uid): New variable.
+ (cse_around_loop): Use it.
+ (cse_main): Set it.
+
+Wed Dec 31 18:40:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * stmt.c (expand_asm_operands): Treat ASM with no outputs as volatile.
+
+Wed Dec 31 08:03:45 1997 Paul Eggert <eggert@twinsun.com>
+
+ * toplev.c (flag_verbose_asm): Default to 0, not 1.
+
+ * i386/bsd386.h (ASM_COMMENT_START): Define to " #".
+
+Tue Dec 30 17:38:55 1997 Jim Wilson <wilson@cygnus.com>
+
+ * unroll.c (find_splittable_givs): Handle givs with
+ dest_reg created by loop.
+
+Tue Dec 30 14:21:33 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * svr4.h (LINK_SPEC): Never specify -h.
+ * ptx4.h (LINK_SPEC): Likewise.
+ * rs6000/sysv4.h (LINK_SPEC): Likewise.
+ * sparc/sol2.h (LINK_SPEC): Likewise.
+
+Tue Dec 30 06:15:23 1997 Philippe De Muyter <phdm@macqel.be>
+
+ * libgcc2.c (_eh_compat): Do not include stdlib.h, but provide a
+ private extern declaration for malloc.
+
+Mon Dec 29 06:56:41 1997 Laurent Guerby <guerby@gnat.com>
+
+ * Makefile.in (stmp-int-hdrs): Add "touch".
+
+Sun Dec 28 19:36:05 1997 Stephen L Moshier <moshier@mediaone.net>
+
+ * mips.h (CACHE_FLUSH_FUNC): New, defaults to _flush_cache.
+ (INITIALIZE_TRAMPOLINE): Use it.
+ * mips/ultrix.h (CACHE_FLUSH_FUNC): Define as cacheflush.
+ * mips/news4.h (CACHE_FLUSH_FUNC): Likewise.
+
+Sun Dec 28 08:19:13 1997 Paul Eggert <eggert@twinsun.com>
+
+ * arm.c: Don't include assert.h.
+ * i960.c: Likewise.
+ (i960_arg_size_and_align): Rewrite to avoid assert.
+ * m88k.c: Don't include assert.h.
+ (expand_block_move): Rewrite to avoid assert.
+ * except.c: Don't include assert.h.
+ (scan_region): Rewrite to avoid assert.
+ (save_eh_status, restore_eh_status, scan_region): Don't bother
+ testing whether pointer is null.
+ * dwarfout.c, dwarf2out.c: Do not include assert.h.
+ (assert): New macro, since we can't use system assert.
+
+Sat Dec 27 19:08:17 1997 Stephen L Moshier <moshier@mediaone.net>
+
+ * mips/ultrix.h (DWARF2_UNWIND_INFO): Define as 0.
+
+Fri Dec 26 05:57:06 1997 Philippe De Muyter <phdm@macqel.be>
+
+ * m68k/mot3300.h (FINALIZE_TRAMPOLINE): Macro defined.
+ * libgcc2.c (__clear_insn_cache): New sysV68-specific helper function
+ for trampolines.
+
+Thu Dec 25 15:22:43 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * rs6000.c (function_arg_padding): All aggregates pad upward.
+
+Wed Dec 24 18:05:13 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * sparc.c: Add prototypes for static functions.
+ (check_pic): Check for form of pic_pc_rtx, not it itself.
+ (pic_setup_code): New function, from finalize_pic.
+ (finalize_pic): Call pic_setup_code and insert after nonlocal_receiver.
+ * sparc.md (nonlocal_goto_receiver): New pattern.
+
+Tue Dec 23 05:54:38 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expr.c (expand_builtin_setjmp): Call builtin_setjmp_receiver.
+ * mips.md (builtin_setjmp_receiver): New pattern.
+
+ * crtstuff.c (__do_global_ctors_aux): Add missing call to
+ FORCE_INIT_SECTION_ALIGN and go back to text section.
+ * i386/sol2.h (FORCE_INIT_SECTION_ALIGN): Remove loop.
+
+ * expr.c (do_store_flag): For shift, get bit count using tree_pow2.
+
+Tue Dec 23 05:21:18 1997 Paul Eggert <eggert@twinsun.com>
+
+ * genattrtab.c (main): Check HAVE_{G,S}ETRLIMIT too.
+
+Mon Dec 22 19:30:59 1997 Michael P. Hayes <michaelh@ongaonga.chch.cri.nz>
+
+ * sdbout.c (plain_type_1): Add missing checks for named types "char"
+ and "int" and check for int by size first.
+
+Mon Dec 22 19:13:58 1997 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * m68k/xm-mot3300.h (ADD_MISSING_{POSIX,XOPEN}): Define.
+ * m88k/xm-sysv3.h: Likewise.
+
+ * configure.in (getrlimit, setrlimit): Call AC_CHECK_FUNCS.
+ * cccp.c (main): Check HAVE_{G,S}ETRLIMIT in addition to RLIMIT_STACK.
+ * toplev.c (main): Likewise.
+
+ * fixincludes (target_canonical): New variable.
+ (size_t): Add support for Motorola's stdlib.h which fails to provide
+ a definition for size_t.
+ (str{len,spn,cspn} return value): Handle different layout on sysV88.
+ (fabs/hypot): Provide a fake for hypot which is broken on
+ m88k-motorola-sysv3; emit a prototype for fabs on m88k-motorola-sysv3.
+
+ * m68k/mot3300.h (ASM_BYTE_OP): Don't include '\t' in definition.
+ (ASM_OUTPUT_ASCII): Prefix ASM_BYTE_OP by one single '\t'.
+
+Mon Dec 22 19:05:49 1997 Richard Henderson <rth@cygnus.com>
+
+ * sparc.md (jump): Don't use the annul bit around an empty loop.
+
+Mon Dec 22 18:52:56 1997 Robert Lipe <robertl@dgii.com>
+
+ * i386/x-sco5 (CLIB) Deleted.
+ (ALLOCA) Added.
+ * i386/xm-sco5.h (USE_C_ALLOCA) Added.
+
+Mon Dec 22 18:42:16 1997 Philippe De Muyter <phdm@macqel.be>
+
+ * m68k/mot3300Mcrt0.S (mcount): Function removed.
+ (__stop_monitor): New function.
+ * m68k/mot3300-crt0.S (__stop_monitor): New (empty) function.
+ (mcount, mcount%, monitor): Common symbols removed.
+ * m68k/mot3300.h (FUNCTION_PROFILER): USE_GAS and !USE_GAS versions
+ fixed and merged.
+ (EXIT_BODY): Always call __stop_monitor without tricky tests.
+
+Mon Dec 22 18:35:05 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * objc/Make-lang.in (runtime-info.h, libobjc_entry.o): Create in
+ build directory.
+ (libobjc.a): Update dependency list.
+ (libobjc.dll): Likewise. Use libobjc_entry.o from build directory.
+ (objc/sendmsg.o): Add -Iobjc to find runtime-info.h.
+ (objc.mostlyclean): Remove runtime-info.h.
+
+Mon Dec 22 18:27:47 1997 Paul Eggert <eggert@twinsun.com>
+
+ * libgcc2.c (_eh_compat): New section.
+ * Makefile.in (LIB2FUNCS): Add _eh_compat.
+
+Mon Dec 22 17:52:37 1997 Marcus G. Daniels <mgd@wijiji.santafe.edu>
+
+ * objc/init.c (_objc_load_callback): Don't initialize.
+
+Sun Dec 21 15:06:00 1997 Paul Eggert <eggert@twinsun.com>
+
+ * mips/xm-iris5.h (HAVE_INTTYPES_H): Force undefined.
+
+Sun Dec 21 14:51:51 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * dwarf2out.c (add_bound_info, case COMPONENT_REF): New case.
+
+Sun Dec 14 06:49:05 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
* expr.c (expand_expr, case PLACEHOLDER_EXPR): Use placeholder_list
expression in preference to any other if correct type.
diff --git a/gcc/INSTALL b/gcc/INSTALL
index 60fabf131b7..0695199650e 100644
--- a/gcc/INSTALL
+++ b/gcc/INSTALL
@@ -452,11 +452,39 @@ and includes all the necessary compilation tools and libraries.
some other compiler.)
16. If you're going to use C++, it's likely that you need to also
- install the libg++ distribution. It should be available from the
- same place where you got the GNU C distribution. Just as GNU C
- does not distribute a C runtime library, it also does not include
- a C++ run-time library. All I/O functionality, special class
- libraries, etc., are available in the libg++ distribution.
+ install a C++ runtime library. Just as GNU C does not distribute
+ a C runtime library, it also does not include a C++ runtime
+ library. All I/O functionality, special class libraries, etc., are
+ provided by the C++ runtime library.
+
+ Here's one way to build and install a C++ runtime library for GNU
+ CC:
+
+ * Build and install GNU CC, so that invoking `gcc' obtains the
+ GNU CC that was just built.
+
+ * Obtain a copy of a compatible `libstdc++' distribution. For
+ example, the `libstdc++-2.8.0.tar.gz' distribution should be
+ compatible with GCC 2.8.0. GCC distributors normally
+ distribute `libstdc++' as well.
+
+ * Set the `CXX' environment variable to `gcc' while running the
+ `libstdc++' distribution's `configure' command. Use the same
+ `configure' options that you used when you invoked GCC's
+ `configure' command.
+
+ * Invoke `make' to build the C++ runtime.
+
+ * Invoke `make install' to install the C++ runtime.
+
+ To summarize, after building and installing GNU CC, invoke the
+ following shell commands in the topmost directory of the C++
+ library distribution. For CONFIGURE-OPTIONS, use the same options
+ that you used to configure GNU CC.
+
+ $ CXX=gcc ./configure CONFIGURE-OPTIONS
+ $ make
+ $ make install
17. GNU CC includes a runtime library for Objective-C because it is an
integral part of the language. You can find the files associated
@@ -1786,8 +1814,8 @@ perform the following steps:
disk:[gcc.gxx_include.] gnu_gxx_include
with the appropriate disk and directory name. If you are going to
- be using libg++, this is where the libg++ install procedure will
- install the libg++ header files.
+ be using a C++ runtime library, this is where its install
+ procedure will install its header files.
2. Obtain the file `gcc-cc1plus.exe', and place this in the same
directory that `gcc-cc1.exe' is kept.
@@ -2020,8 +2048,8 @@ before GNU CC is built. If the cross compilation header files are
already suitable for ANSI C and GNU CC, nothing special need be done).
`GPLUS_INCLUDE_DIR' means the same thing for native and cross. It
-is where `g++' looks first for header files. `libg++' installs only
-target independent header files in that directory.
+is where `g++' looks first for header files. The C++ library installs
+only target independent header files in that directory.
`LOCAL_INCLUDE_DIR' is used only for a native compiler. It is
normally `/usr/local/include'. GNU CC searches this directory so that
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 7ff739d938d..96a109138aa 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1945,9 +1945,11 @@ stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
# The sed command gets just the last file name component;
# this is necessary because VPATH could add a dirname.
# Using basename would be simpler, but some systems don't have it.
+# The touch command is here to workaround an AIX/Linux NFS bug.
for file in .. $(USER_H); do \
if [ X$$file != X.. ]; then \
realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
+ touch include/$$realfile; \
rm -f include/$$realfile; \
cp $$file include; \
chmod a+r include/$$realfile; \
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 381d5e9aae1..486206a441f 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -1241,7 +1241,7 @@ main (argc, argv)
rlim.rlim_cur = rlim.rlim_max;
setrlimit (RLIMIT_STACK, &rlim);
}
-#endif /* RLIMIT_STACK defined */
+#endif
#ifdef SIGPIPE
signal (SIGPIPE, pipe_closed);
diff --git a/gcc/combine.c b/gcc/combine.c
index 1546ec64845..5e76fc6752c 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1,5 +1,5 @@
/* Optimize by combining instructions for GNU compiler.
- Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index b73da5b1f37..5e12e8d30f6 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#include <string.h>
-#include "assert.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
diff --git a/gcc/config/i386/bsd386.h b/gcc/config/i386/bsd386.h
index 2c405a0f1ce..52e135f35b2 100644
--- a/gcc/config/i386/bsd386.h
+++ b/gcc/config/i386/bsd386.h
@@ -1,5 +1,5 @@
-/* Configuration for an i386 running BSDI's BSD/386 1.1 as the target
- machine. */
+/* Configuration for an i386 running BSDI's BSD/OS (formerly known as BSD/386)
+ as the target machine. */
#include "i386/386bsd.h"
@@ -17,8 +17,9 @@
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
+/* This is suitable for BSD/OS 3.0; we don't know about earlier releases. */
#undef ASM_COMMENT_START
-#define ASM_COMMENT_START "#"
+#define ASM_COMMENT_START " #"
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index eeb04c40b25..d8c1d7336f5 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -1226,7 +1226,11 @@ while(0)
/* Emit RTL insns to initialize the variable parts of a trampoline.
FNADDR is an RTX for the address of the function's pure code.
- CXT is an RTX for the static chain value for the function. */
+ CXT is an RTX for the static chain value for the function.
+
+ We generate a two-instructions program at address TRAMP :
+ movea.l &CXT,%a0
+ jmp FNADDR */
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
{ \
diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h
index 5e99b65a358..65c2f476043 100644
--- a/gcc/config/m68k/mot3300.h
+++ b/gcc/config/m68k/mot3300.h
@@ -147,13 +147,8 @@ Boston, MA 02111-1307, USA. */
asm_fprintf (FILE, "\tmov.l %Ra0,%Rd0\n"); }
#undef FUNCTION_PROFILER
-#ifndef USE_GAS
-#define FUNCTION_PROFILER(FILE, LABEL_NO) \
- asm_fprintf (FILE, "\tmov.l %ILP%%%d,%Ra0\n\tjsr mcount%%\n", (LABEL_NO))
-#else /* USE_GAS */
#define FUNCTION_PROFILER(FILE, LABEL_NO) \
- asm_fprintf (FILE, "\tmov.l %I%.LP%d,%Ra0\n\tjsr mcount%%\n", (LABEL_NO))
-#endif /* USE_GAS */
+ asm_fprintf (FILE, "\tmov.l %I%LLP%d,%Ra0\n\tjsr mcount%%\n", (LABEL_NO))
/* This is how to output an insn to push a register on the stack.
It need not be very fast code. */
@@ -797,20 +792,25 @@ do {(CUM).offset = 0;\
#define MATH_LIBRARY "-lm881"
#endif
-/* Currently we do not have the atexit() function;
- * so take that from libgcc2.c
- */
+/* Currently we do not have the atexit() function,
+ so take that from libgcc2.c */
#define NEED_ATEXIT 1
#define HAVE_ATEXIT 1
#define EXIT_BODY \
do \
- { extern void monitor (); \
- extern long mcount asm ("mcount%"); \
- extern long etext; \
- \
- if (&mcount < &etext) \
- monitor (0); \
+ { \
+ __stop_monitor (); \
_cleanup (); \
} while (0)
+
+/* FINALIZE_TRAMPOLINE clears the instruction cache. */
+
+#undef FINALIZE_TRAMPOLINE
+#define FINALIZE_TRAMPOLINE(TRAMP) \
+ if (!TARGET_68040) \
+ ; \
+ else \
+ emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__clear_insn_cache"), \
+ 0, VOIDmode, 0)
diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c
index 45938a1d1e9..67df28e5940 100644
--- a/gcc/config/m88k/m88k.c
+++ b/gcc/config/m88k/m88k.c
@@ -27,7 +27,6 @@ Boston, MA 02111-1307, USA. */
#include <time.h>
#include <ctype.h>
-#include "assert.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
@@ -501,9 +500,10 @@ expand_block_move (dest_mem, src_mem, operands)
int bytes = (constp ? INTVAL (operands[2]) : 0);
int target = (int) m88k_cpu;
- assert (PROCESSOR_M88100 == 0);
- assert (PROCESSOR_M88110 == 1);
- assert (PROCESSOR_M88000 == 2);
+ if (! (PROCESSOR_M88100 == 0
+ && PROCESSOR_M88110 == 1
+ && PROCESSOR_M88000 == 2))
+ abort ();
if (constp && bytes <= 0)
return;
diff --git a/gcc/config/m88k/xm-sysv3.h b/gcc/config/m88k/xm-sysv3.h
index 2a48840c75e..3e8ab39dc95 100644
--- a/gcc/config/m88k/xm-sysv3.h
+++ b/gcc/config/m88k/xm-sysv3.h
@@ -1,6 +1,6 @@
/* Configuration for GNU C-compiler.
Motorola m88100 running the AT&T/Unisoft/Motorola V.3 reference port.
- Copyright (C) 1990 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 8b0e6e33c44..42f9da1862b 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2538,6 +2538,13 @@ typedef struct mips_args {
#define TRAMPOLINE_ALIGNMENT (TARGET_LONG64 ? 64 : 32)
+/* INITIALIZE_TRAMPOLINE calls this library function to flush
+ program and data caches. */
+
+#ifndef CACHE_FLUSH_FUNC
+#define CACHE_FLUSH_FUNC "_flush_cache"
+#endif
+
/* A C statement to initialize the variable parts of a trampoline.
ADDR is an RTX for the address of the trampoline; FNADDR is an
RTX for the address of the nested function; STATIC_CHAIN is an
@@ -2561,7 +2568,7 @@ typedef struct mips_args {
/* Flush both caches. We need to flush the data cache in case \
the system has a write-back cache. */ \
/* ??? Should check the return value for errors. */ \
- emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "_flush_cache"), \
+ emit_library_call (gen_rtx (SYMBOL_REF, Pmode, CACHE_FLUSH_FUNC), \
0, VOIDmode, 3, addr, Pmode, \
GEN_INT (TRAMPOLINE_SIZE), TYPE_MODE (integer_type_node),\
GEN_INT (3), TYPE_MODE (integer_type_node)); \
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index dca0438dc93..b116b2b9f65 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -8740,6 +8740,18 @@ move\\t%0,%z4\\n\\
{
emit_insn (gen_blockage ());
}")
+
+;; For n32/n64, we need to restore gp after a builtin setjmp. We do this
+;; by making use of the fact that we've just called __dummy.
+
+(define_expand "builtin_setjmp_receiver"
+ [(const_int 0)]
+ "TARGET_ABICALLS && mips_abi != ABI_32"
+ "
+{
+ emit_insn (gen_loadgp (gen_rtx (SYMBOL_REF, Pmode, \"__dummy\")));
+ emit_insn (gen_blockage ());
+}")
;;
;; ....................
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index f8a10b6cf4f..34964a50fba 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1181,10 +1181,8 @@ function_arg_padding (mode, type)
enum machine_mode mode;
tree type;
{
- if (type && TREE_CODE (type) == RECORD_TYPE)
- {
- return upward;
- }
+ if (type != 0 && AGGREGATE_TYPE_P (type))
+ return upward;
/* This is the default definition. */
return (! BYTES_BIG_ENDIAN
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 02cedde86b4..88833b2adf0 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -100,8 +100,16 @@ char leaf_reg_remap[] =
static char *frame_base_name;
static int frame_base_offset;
-static rtx find_addr_reg ();
-static void sparc_init_modes ();
+static rtx pic_setup_code PROTO((void));
+static rtx find_addr_reg PROTO((rtx));
+static void sparc_init_modes PROTO((void));
+static int save_regs PROTO((FILE *, int, int, char *,
+ int, int, int));
+static int restore_regs PROTO((FILE *, int, int, char *, int, int));
+static void build_big_number PROTO((FILE *, int, char *));
+static function_arg_slotno PROTO((const CUMULATIVE_ARGS *,
+ enum machine_mode, tree, int, int,
+ int *, int *));
#ifdef DWARF2_DEBUGGING_INFO
extern char *dwarf2out_cfi_label ();
@@ -1324,9 +1332,8 @@ reg_unused_after (reg, insn)
return 1;
}
-/* The rtx for the global offset table which is a special form
- that *is* a position independent symbolic constant. */
-static rtx pic_pc_rtx;
+/* The table we use to reference PIC data. */
+static rtx global_offset_table;
/* Ensure that we are not using patterns that are not OK with PIC. */
@@ -1339,7 +1346,11 @@ check_pic (i)
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])))
+ && ! (GET_CODE (XEXP (recog_operand[i], 0)) == MINUS
+ && (XEXP (XEXP (recog_operand[i], 0), 0)
+ == global_offset_table)
+ && (GET_CODE (XEXP (XEXP (recog_operand[i], 0), 1))
+ == CONST))))
abort ();
case 2:
default:
@@ -1472,39 +1483,26 @@ initialize_pic ()
{
}
-/* Emit special PIC prologues and epilogues. */
+/* Return the RTX for insns to set the PIC register. */
-void
-finalize_pic ()
+static rtx
+pic_setup_code ()
{
- /* The table we use to reference PIC data. */
- rtx global_offset_table;
- /* Labels to get the PC in the prologue of this function. */
+ rtx pic_pc_rtx;
rtx l1, l2;
rtx seq;
- int orig_flag_pic = flag_pic;
-
- if (current_function_uses_pic_offset_table == 0)
- return;
-
- if (! flag_pic)
- abort ();
-
- flag_pic = 0;
start_sequence ();
l1 = gen_label_rtx ();
- /* Initialize every time through, since we can't easily
- know this to be permanent. */
- global_offset_table = gen_rtx (SYMBOL_REF, Pmode, "_GLOBAL_OFFSET_TABLE_");
pic_pc_rtx = gen_rtx (CONST, Pmode,
gen_rtx (MINUS, Pmode,
global_offset_table,
gen_rtx (CONST, Pmode,
gen_rtx (MINUS, Pmode,
- gen_rtx (LABEL_REF, VOIDmode, l1),
+ gen_rtx (LABEL_REF,
+ VOIDmode, l1),
pc_rtx))));
/* sparc64: the RDPC instruction doesn't pair, and puts 4 bubbles in the
@@ -1543,14 +1541,46 @@ finalize_pic ()
LABEL_PRESERVE_P (l1) = 1;
LABEL_PRESERVE_P (l2) = 1;
- flag_pic = orig_flag_pic;
-
seq = gen_sequence ();
end_sequence ();
- emit_insn_after (seq, get_insns ());
+
+ return seq;
+}
+
+/* Emit special PIC prologues and epilogues. */
+
+void
+finalize_pic ()
+{
+ /* Labels to get the PC in the prologue of this function. */
+ int orig_flag_pic = flag_pic;
+ rtx insn;
+
+ if (current_function_uses_pic_offset_table == 0)
+ return;
+
+ if (! flag_pic)
+ abort ();
+
+ /* Initialize every time through, since we can't easily
+ know this to be permanent. */
+ global_offset_table = gen_rtx (SYMBOL_REF, Pmode, "_GLOBAL_OFFSET_TABLE_");
+ flag_pic = 0;
+
+ emit_insn_after (pic_setup_code (), get_insns ());
+
+ /* Insert the code in each nonlocal goto receiver. */
+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
+ && XINT (PATTERN (insn), 1) == 4)
+ emit_insn_after (pic_setup_code (), insn);
+
+ flag_pic = orig_flag_pic;
/* Need to emit this whether or not we obey regdecls,
- since setjmp/longjmp can cause life info to screw up. */
+ since setjmp/longjmp can cause life info to screw up.
+ ??? In the case where we don't obey regdecls, this is not sufficient
+ since we may not fall out the bottom. */
emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
}
@@ -4194,10 +4224,8 @@ function_arg_padding (mode, type)
enum machine_mode mode;
tree type;
{
- if (TARGET_ARCH64 && type && TREE_CODE (type) == RECORD_TYPE)
- {
- return upward;
- }
+ if (TARGET_ARCH64 && type != 0 && AGGREGATE_TYPE_P (type))
+ return upward;
/* This is the default definition. */
return (! BYTES_BIG_ENDIAN
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 8b235fb2e49..6efa3320852 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -6150,3 +6150,12 @@
(set (reg:CC 100) (compare (match_dup 0) (const_int 0)))]
""
"subxcc %r1,0,%0")
+
+;; After a nonlocal goto, we need to restore the PIC register, but only
+;; if we need it. So do nothing much here, but we'll check for this in
+;; finalize_pic.
+
+(define_insn "nonlocal_goto_receiver"
+ [(unspec_volatile [(const_int 0)] 4)]
+ "flag_pic"
+ "")
diff --git a/gcc/config/svr4.h b/gcc/config/svr4.h
index 4bd9d6aaff8..c7fac28beea 100644
--- a/gcc/config/svr4.h
+++ b/gcc/config/svr4.h
@@ -1,6 +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, 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 94-97, 1998 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GNU CC.
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9bfdd3ea748..ab1678a63e0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -29,6 +29,10 @@ Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (build_modify_expr): Remove code that ignores trivial
methods.
+Mon Dec 22 17:46:17 1997 Mark Mitchell <mmitchell@usa.net>
+
+ * method.c (build_overload_name): Fix mangling for __null.
+
Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c (add_builtin_candidate): Add default case in enumeration
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 117fb029936..f93836cb00f 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1,6 +1,6 @@
/* Handle the hair of processing (but not expanding) inline functions.
Also manage function and variable name overloading.
- Copyright (C) 1987, 89, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1987, 89, 92-96, 1997 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -1047,8 +1047,10 @@ build_overload_name (parmtypes, begin, end)
}
case UNKNOWN_TYPE:
- /* This will take some work. */
- OB_PUTC ('?');
+ /* We can get here if __null is defined to have type ({unkown
+ type}*), which it is if -ansi is not used. Treat this
+ like 'void*'. */
+ OB_PUTC ('v');
break;
case TEMPLATE_TYPE_PARM:
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c
index d296ea9084b..362a2a60ef2 100644
--- a/gcc/crtstuff.c
+++ b/gcc/crtstuff.c
@@ -389,6 +389,10 @@ __do_global_ctors_aux () /* prologue goes in .text section */
asm (INIT_SECTION_ASM_OP);
DO_GLOBAL_CTORS_BODY;
ON_EXIT (__do_global_dtors, 0);
+#ifdef FORCE_INIT_SECTION_ALIGN
+ FORCE_INIT_SECTION_ALIGN;
+#endif
+ asm (TEXT_SECTION_ASM_OP);
} /* epilogue and body go in .init section */
#endif /* OBJECT_FORMAT_ELF */
diff --git a/gcc/cse.c b/gcc/cse.c
index 1efe37878f0..f0e331aa90c 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -1,5 +1,5 @@
/* Common subexpression elimination for GNU compiler.
- Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index f41cd5efeb0..627ddb2eade 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -41,6 +41,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "except.h"
#include "dwarf2.h"
+/* We cannot use <assert.h> in GCC source, since that would include
+ GCC's assert.h, which may not be compatible with the host compiler. */
+#undef assert
+#ifdef NDEBUG
+# define assert(e)
+#else
+# define assert(e) do { if (! (e)) abort (); } while (0)
+#endif
+
/* Decide whether we want to emit frame unwind information for the current
translation unit. */
@@ -7127,6 +7136,7 @@ add_bound_info (subrange_die, bound_attr, bound)
case MAX_EXPR:
case VAR_DECL:
+ case COMPONENT_REF:
/* ??? These types of bounds can be created by the Ada front end,
and it isn't clear how to emit debug info for them. */
break;
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index 528886a34f8..46815239ecb 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -58,6 +58,15 @@ extern time_t time ();
#endif
#endif
+/* We cannot use <assert.h> in GCC source, since that would include
+ GCC's assert.h, which may not be compatible with the host compiler. */
+#undef assert
+#ifdef NDEBUG
+# define assert(e)
+#else
+# define assert(e) do { if (! (e)) abort (); } while (0)
+#endif
+
extern char *getpwd ();
#ifdef NEED_DECLARATION_INDEX
diff --git a/gcc/expr.c b/gcc/expr.c
index e54f3e47a45..c99d77945ff 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1,5 +1,5 @@
/* Convert tree expression to rtl instructions, for GNU compiler.
- Copyright (C) 1988, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1988, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -2437,7 +2437,7 @@ get_push_address (size)
else
temp = stack_pointer_rtx;
- return force_operand (temp, NULL_RTX);
+ return copy_to_reg (temp);
}
/* Generate code to push X onto the stack, assuming it has mode MODE and
@@ -2566,7 +2566,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
in_check_memory_usage = 1;
temp = get_push_address (INTVAL(size) - used);
- if (GET_CODE (x) == MEM && AGGREGATE_TYPE_P (type))
+ if (GET_CODE (x) == MEM && type && AGGREGATE_TYPE_P (type))
emit_library_call (chkr_copy_bitmap_libfunc, 1, VOIDmode, 3,
temp, ptr_mode,
XEXP (xinner, 0), ptr_mode,
@@ -2622,7 +2622,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
in_check_memory_usage = 1;
target = copy_to_reg (temp);
- if (GET_CODE (x) == MEM && AGGREGATE_TYPE_P (type))
+ if (GET_CODE (x) == MEM && type && AGGREGATE_TYPE_P (type))
emit_library_call (chkr_copy_bitmap_libfunc, 1, VOIDmode, 3,
target, ptr_mode,
XEXP (xinner, 0), ptr_mode,
@@ -2834,7 +2834,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
if (target == 0)
target = get_push_address (GET_MODE_SIZE (mode));
- if (GET_CODE (x) == MEM && AGGREGATE_TYPE_P (type))
+ if (GET_CODE (x) == MEM && type && AGGREGATE_TYPE_P (type))
emit_library_call (chkr_copy_bitmap_libfunc, 1, VOIDmode, 3,
target, ptr_mode,
XEXP (x, 0), ptr_mode,
@@ -5512,12 +5512,16 @@ expand_expr (exp, target, tmode, modifier)
memory_usage = get_memory_usage_from_modifier (modifier);
if (memory_usage != MEMORY_USE_DONT)
- emit_library_call (chkr_check_addr_libfunc, 1, VOIDmode, 3,
- op0, ptr_mode,
- GEN_INT (int_size_in_bytes (type)),
- TYPE_MODE (sizetype),
- GEN_INT (memory_usage),
- TYPE_MODE (integer_type_node));
+ {
+ in_check_memory_usage = 1;
+ emit_library_call (chkr_check_addr_libfunc, 1, VOIDmode, 3,
+ op0, ptr_mode,
+ GEN_INT (int_size_in_bytes (type)),
+ TYPE_MODE (sizetype),
+ GEN_INT (memory_usage),
+ TYPE_MODE (integer_type_node));
+ in_check_memory_usage = 0;
+ }
}
temp = gen_rtx (MEM, mode, op0);
@@ -8320,6 +8324,11 @@ expand_builtin_setjmp (buf_addr, target)
#endif
abort ();
+#ifdef HAVE_builtin_setjmp_receiver
+ if (HAVE_builtin_setjmp_receiver)
+ emit_insn (gen_builtin_setjmp_receiver ());
+#endif
+
emit_move_insn (target, const1_rtx);
emit_label (lab2);
return target;
@@ -9003,8 +9012,8 @@ expand_builtin (exp, target, subtarget, mode, ignore)
/* Just copy the rights of SRC to the rights of DEST. */
if (flag_check_memory_usage)
emit_library_call (chkr_copy_bitmap_libfunc, 1, VOIDmode, 3,
- src_rtx, ptr_mode,
dest_rtx, ptr_mode,
+ src_rtx, ptr_mode,
len_rtx, TYPE_MODE (sizetype));
/* There could be a void* cast on top of the object. */
@@ -11119,29 +11128,12 @@ do_store_flag (exp, target, mode, only_cheap)
if ((code == NE || code == EQ)
&& TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1)
- && integer_pow2p (TREE_OPERAND (arg0, 1))
- && TYPE_PRECISION (type) <= HOST_BITS_PER_WIDE_INT)
+ && integer_pow2p (TREE_OPERAND (arg0, 1)))
{
tree inner = TREE_OPERAND (arg0, 0);
- HOST_WIDE_INT tem;
- int bitnum;
+ int bitnum = tree_log2 (TREE_OPERAND (arg0, 1));
int ops_unsignedp;
- tem = INTVAL (expand_expr (TREE_OPERAND (arg0, 1),
- NULL_RTX, VOIDmode, 0));
- /* In this case, immed_double_const will sign extend the value to make
- it look the same on the host and target. We must remove the
- sign-extension before calling exact_log2, since exact_log2 will
- fail for negative values. */
- if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT
- && BITS_PER_WORD == GET_MODE_BITSIZE (TYPE_MODE (type)))
- /* We don't use the obvious constant shift to generate the mask,
- because that generates compiler warnings when BITS_PER_WORD is
- greater than or equal to HOST_BITS_PER_WIDE_INT, even though this
- code is unreachable in that case. */
- tem = tem & GET_MODE_MASK (word_mode);
- bitnum = exact_log2 (tem);
-
/* If INNER is a right shift of a constant and it plus BITNUM does
not overflow, adjust BITNUM and INNER. */
@@ -11151,7 +11143,7 @@ do_store_flag (exp, target, mode, only_cheap)
&& (bitnum + TREE_INT_CST_LOW (TREE_OPERAND (inner, 1))
< TYPE_PRECISION (type)))
{
- bitnum +=TREE_INT_CST_LOW (TREE_OPERAND (inner, 1));
+ bitnum += TREE_INT_CST_LOW (TREE_OPERAND (inner, 1));
inner = TREE_OPERAND (inner, 0);
}
diff --git a/gcc/extend.texi b/gcc/extend.texi
index 7c852c0e515..f50c2073562 100644
--- a/gcc/extend.texi
+++ b/gcc/extend.texi
@@ -366,9 +366,7 @@ does not refer to anything that has gone out of scope, you should be
safe.
GNU CC implements taking the address of a nested function using a
-technique called @dfn{trampolines}. A paper describing them is
-available from @samp{maya.idiap.ch} in directory @file{pub/tmb},
-file @file{usenix88-lexic.ps.Z}.
+technique called @dfn{trampolines}.
A nested function can jump to a label inherited from a containing
function, provided the label was explicitly declared in the containing
@@ -2277,14 +2275,14 @@ did the easy thing, and turned it off.
@cindex assembler instructions
@cindex registers
-In an assembler instruction using @code{asm}, you can now specify the
-operands of the instruction using C expressions. This means no more
-guessing which registers or memory locations will contain the data you want
+In an assembler instruction using @code{asm}, you can specify the
+operands of the instruction using C expressions. This means you need not
+guess which registers or memory locations will contain the data you want
to use.
-You must specify an assembler instruction template much like what appears
-in a machine description, plus an operand constraint string for each
-operand.
+You must specify an assembler instruction template much like what
+appears in a machine description, plus an operand constraint string for
+each operand.
For example, here is how to use the 68881's @code{fsinx} instruction:
@@ -2295,65 +2293,66 @@ asm ("fsinx %1,%0" : "=f" (result) : "f" (angle));
@noindent
Here @code{angle} is the C expression for the input operand while
@code{result} is that of the output operand. Each has @samp{"f"} as its
-operand constraint, saying that a floating point register is required. The
-@samp{=} in @samp{=f} indicates that the operand is an output; all output
-operands' constraints must use @samp{=}. The constraints use the same
-language used in the machine description (@pxref{Constraints}).
-
-Each operand is described by an operand-constraint string followed by the C
-expression in parentheses. A colon separates the assembler template from
-the first output operand, and another separates the last output operand
-from the first input, if any. Commas separate output operands and separate
-inputs. The total number of operands is limited to ten or to the maximum
-number of operands in any instruction pattern in the machine description,
-whichever is greater.
-
-If there are no output operands, and there are input operands, then there
-must be two consecutive colons surrounding the place where the output
+operand constraint, saying that a floating point register is required.
+The @samp{=} in @samp{=f} indicates that the operand is an output; all
+output operands' constraints must use @samp{=}. The constraints use the
+same language used in the machine description (@pxref{Constraints}).
+
+Each operand is described by an operand-constraint string followed by
+the C expression in parentheses. A colon separates the assembler
+template from the first output operand and another separates the last
+output operand from the first input, if any. Commas separate the
+operands within each group. The total number of operands is limited to
+ten or to the maximum number of operands in any instruction pattern in
+the machine description, whichever is greater.
+
+If there are no output operands but there are input operands, you must
+place two consecutive colons surrounding the place where the output
operands would go.
Output operand expressions must be lvalues; the compiler can check this.
-The input operands need not be lvalues. The compiler cannot check whether
-the operands have data types that are reasonable for the instruction being
-executed. It does not parse the assembler instruction template and does
-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 ordinary output operands must be write-only; GNU CC will assume
-that the values in these operands before the instruction are dead and
-need not be generated. Extended asm supports input-output or
-read-write operands. Use the constraint character @samp{+} to indicate
-such an operand and list it with the output operands.
-
-When the constraints for the read-write operand
-(or the operand in which only some of the bits are to be changed)
-allows a register, you may, as an alternative, logically
-split its function into two separate operands, one input operand and one
-write-only output operand. The connection between them is expressed by
-constraints which say they need to be in the same location when the
-instruction executes. You can use the same C expression for both
-operands, or different expressions. For example, here we write the
-(fictitious) @samp{combine} instruction with @code{bar} as its read-only
-source operand and @code{foo} as its read-write destination:
+The input operands need not be lvalues. The compiler cannot check
+whether the operands have data types that are reasonable for the
+instruction being executed. It does not parse the assembler instruction
+template and does not know what it means or even whether it is valid
+assembler input. The extended @code{asm} feature is most often used for
+machine instructions 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 ordinary output operands must be write-only; GNU CC will assume that
+the values in these operands before the instruction are dead and need
+not be generated. Extended asm supports input-output or read-write
+operands. Use the constraint character @samp{+} to indicate such an
+operand and list it with the output operands.
+
+When the constraints for the read-write operand (or the operand in which
+only some of the bits are to be changed) allows a register, you may, as
+an alternative, logically split its function into two separate operands,
+one input operand and one write-only output operand. The connection
+between them is expressed by constraints which say they need to be in
+the same location when the instruction executes. You can use the same C
+expression for both operands, or different expressions. For example,
+here we write the (fictitious) @samp{combine} instruction with
+@code{bar} as its read-only source operand and @code{foo} as its
+read-write destination:
@example
asm ("combine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar));
@end example
@noindent
-The constraint @samp{"0"} for operand 1 says that it must occupy the same
-location as operand 0. A digit in constraint is allowed only in an input
-operand, and it must refer to an output operand.
+The constraint @samp{"0"} for operand 1 says that it must occupy the
+same location as operand 0. A digit in constraint is allowed only in an
+input operand and it must refer to an output operand.
Only a digit in the constraint can guarantee that one operand will be in
-the same place as another. The mere fact that @code{foo} is the value of
-both operands is not enough to guarantee that they will be in the same
-place in the generated assembler code. The following would not work:
+the same place as another. The mere fact that @code{foo} is the value
+of both operands is not enough to guarantee that they will be in the
+same place in the generated assembler code. The following would not
+work reliably:
@example
asm ("combine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar));
@@ -2367,10 +2366,10 @@ register (copying it afterward to @code{foo}'s own address). Of course,
since the register for operand 1 is not even mentioned in the assembler
code, the result will not work, but GNU CC can't tell that.
-Some instructions clobber specific hard registers. To describe this, write
-a third colon after the input operands, followed by the names of the
-clobbered hard registers (given as strings). Here is a realistic example
-for the Vax:
+Some instructions clobber specific hard registers. To describe this,
+write a third colon after the input operands, followed by the names of
+the clobbered hard registers (given as strings). Here is a realistic
+example for the VAX:
@example
asm volatile ("movc3 %0,%1,%2"
@@ -2380,32 +2379,32 @@ asm volatile ("movc3 %0,%1,%2"
@end example
If you refer to a particular hardware register from the assembler code,
-then you will probably have to list the register after the third colon
-to tell the compiler that the register's value is modified. In many
-assemblers, the register names begin with @samp{%}; to produce one
-@samp{%} in the assembler code, you must write @samp{%%} in the input.
-
-If your assembler instruction can alter the condition code register,
-add @samp{cc} to the list of clobbered registers. GNU CC on some
-machines represents the condition codes as a specific hardware
-register; @samp{cc} serves to name this register. On other machines,
-the condition code is handled differently, and specifying @samp{cc}
-has no effect. But it is valid no matter what the machine.
+you will probably have to list the register after the third colon to
+tell the compiler the register's value is modified. In some assemblers,
+the register names begin with @samp{%}; to produce one @samp{%} in the
+assembler code, you must write @samp{%%} in the input.
+
+If your assembler instruction can alter the condition code register, add
+@samp{cc} to the list of clobbered registers. GNU CC on some machines
+represents the condition codes as a specific hardware register;
+@samp{cc} serves to name this register. On other machines, the
+condition code is handled differently, and specifying @samp{cc} has no
+effect. But it is valid no matter what the machine.
If your assembler instruction modifies memory in an unpredictable
-fashion, add @samp{memory} to the list of clobbered registers.
-This will cause GNU CC to not keep memory values cached in
-registers across the assembler instruction.
+fashion, add @samp{memory} to the list of clobbered registers. This
+will cause GNU CC to not keep memory values cached in registers across
+the assembler instruction.
-You can put multiple assembler instructions together in a single @code{asm}
-template, separated either with newlines (written as @samp{\n}) or with
-semicolons if the assembler allows such semicolons. The GNU assembler
-allows semicolons and all Unix assemblers seem to do so. The input
-operands are guaranteed not to use any of the clobbered registers, and
-neither will the output operands' addresses, so you can read and write the
-clobbered registers as many times as you like. Here is an example of
-multiple instructions in a template; it assumes that the subroutine
-@code{_foo} accepts arguments in registers 9 and 10:
+You can put multiple assembler instructions together in a single
+@code{asm} template, separated either with newlines (written as
+@samp{\n}) or with semicolons if the assembler allows such semicolons.
+The GNU assembler allows semicolons and most Unix assemblers seem to do
+so. The input operands are guaranteed not to use any of the clobbered
+registers, and neither will the output operands' addresses, so you can
+read and write the clobbered registers as many times as you like. Here
+is an example of multiple instructions in a template; it assumes the
+subroutine @code{_foo} accepts arguments in registers 9 and 10:
@example
asm ("movl %0,r9;movl %1,r10;call _foo"
@@ -2414,16 +2413,16 @@ asm ("movl %0,r9;movl %1,r10;call _foo"
: "r9", "r10");
@end example
-Unless an output operand has the @samp{&} constraint modifier, GNU CC may
-allocate it in the same register as an unrelated input operand, on the
-assumption that the inputs are consumed before the outputs are produced.
+Unless an output operand has the @samp{&} constraint modifier, GNU CC
+may allocate it in the same register as an unrelated input operand, on
+the assumption the inputs are consumed before the outputs are produced.
This assumption may be false if the assembler code actually consists of
more than one instruction. In such a case, use @samp{&} for each output
-operand that may not overlap an input.
-@xref{Modifiers}.
+operand that may not overlap an input. @xref{Modifiers}.
-If you want to test the condition code produced by an assembler instruction,
-you must include a branch and a label in the @code{asm} construct, as follows:
+If you want to test the condition code produced by an assembler
+instruction, you must include a branch and a label in the @code{asm}
+construct, as follows:
@example
asm ("clr %0;frob %1;beq 0f;mov #1,%0;0:"
@@ -2436,8 +2435,8 @@ This assumes your assembler supports local labels, as the GNU assembler
and most Unix assemblers do.
Speaking of labels, jumps from one @code{asm} to another are not
-supported. The compiler's optimizers do not know about these jumps,
-and therefore they cannot take account of them when deciding how to
+supported. The compiler's optimizers do not know about these jumps, and
+therefore they cannot take account of them when deciding how to
optimize.
@cindex macros containing @code{asm}
@@ -2456,8 +2455,8 @@ Here the variable @code{__arg} is used to make sure that the instruction
operates on a proper @code{double} value, and to accept only those
arguments @code{x} which can convert automatically to a @code{double}.
-Another way to make sure the instruction operates on the correct data type
-is to use a cast in the @code{asm}. This is different from using a
+Another way to make sure the instruction operates on the correct data
+type is to use a cast in the @code{asm}. This is different from using a
variable @code{__arg} in that it converts more different types. For
example, if the desired type were @code{int}, casting the argument to
@code{int} would accept a pointer with no complaint, while assigning the
@@ -2465,27 +2464,40 @@ argument to an @code{int} variable named @code{__arg} would warn about
using a pointer unless the caller explicitly casts it.
If an @code{asm} has output operands, GNU CC assumes for optimization
-purposes that the instruction has no side effects except to change the
-output operands. This does not mean that instructions with a side effect
-cannot be used, but you must be careful, because the compiler may eliminate
-them if the output operands aren't used, or move them out of loops, or
-replace two with one if they constitute a common subexpression. Also, if
-your instruction does have a side effect on a variable that otherwise
-appears not to change, the old value of the variable may be reused later if
-it happens to be found in a register.
+purposes the instruction has no side effects except to change the output
+operands. This does not mean instructions with a side effect cannot be
+used, but you must be careful, because the compiler may eliminate them
+if the output operands aren't used, or move them out of loops, or
+replace two with one if they constitute a common subexpression. Also,
+if your instruction does have a side effect on a variable that otherwise
+appears not to change, the old value of the variable may be reused later
+if it happens to be found in a register.
You can prevent an @code{asm} instruction from being deleted, moved
significantly, or combined, by writing the keyword @code{volatile} after
the @code{asm}. For example:
@example
-#define set_priority(x) \
-asm volatile ("set_priority %0": /* no outputs */ : "g" (x))
-@end example
+#define get_and_set_priority(new) \
+(@{ int __old; \
+ asm volatile ("get_and_set_priority %0, %1": "=g" (__old) : "g" (new)); \
+ __old; @})
+b@end example
@noindent
-An instruction without output operands will not be deleted or moved
-significantly, regardless, unless it is unreachable.
+If you write an @code{asm} instruction with no outputs, GNU CC will know
+the instruction has side-effects and will not delete the instruction or
+move it outside of loops. If the side-effects of your instruction are
+not purely external, but will affect variables in your program in ways
+other than reading the inputs and clobbering the specified registers or
+memory, you should write the @code{volatile} keyword to prevent future
+versions of GNU CC from moving the instruction around within a core
+region.
+
+An @code{asm} instruction without any operands or clobbers (and ``old
+style'' @code{asm}) will not be deleted or moved significantly,
+regardless, unless it is unreachable, the same wasy as if you had
+written a @code{volatile} keyword.
Note that even a volatile @code{asm} instruction can be moved in ways
that appear insignificant to the compiler, such as across jump
diff --git a/gcc/flags.h b/gcc/flags.h
index 05feed25b35..616726e06d6 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -399,7 +399,7 @@ extern int flag_function_sections;
the generated assembly code (to make it more readable). This option
is generally only of use to those who actually need to read the
generated assembly code (perhaps while debugging the compiler itself).
- -fverbose-asm is the default. -fno-verbose-asm causes the extra information
+ -fno-verbose-asm, the default, causes the extra information
to not be added and is useful when comparing two assembler files. */
extern int flag_verbose_asm;
diff --git a/gcc/function.c b/gcc/function.c
index 2759b80fde0..ed4ed81353a 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1,5 +1,5 @@
/* Expands front end tree to back end RTL for GNU C-Compiler
- Copyright (C) 1987, 88, 89, 91-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 91-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -4339,7 +4339,9 @@ assign_parms (fndecl, second_time)
emit_move_insn (validize_mem (stack_parm),
validize_mem (entry_parm));
}
- if (flag_check_memory_usage)
+ if (flag_check_memory_usage
+ && entry_parm != stack_parm
+ && promoted_mode != nominal_mode)
{
push_to_sequence (conversion_insns);
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
diff --git a/gcc/gcc.texi b/gcc/gcc.texi
index bd3b0b01c80..2a54a70900b 100644
--- a/gcc/gcc.texi
+++ b/gcc/gcc.texi
@@ -96,7 +96,7 @@ Published by the Free Software Foundation
59 Temple Place - Suite 330
Boston, MA 02111-1307 USA
-Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -144,7 +144,7 @@ original English.
@sp 2
@center Richard M. Stallman
@sp 3
-@center Last updated 4 December 1997
+@center Last updated 7 January 1998
@sp 1
@c The version number appears three times more in this file.
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 8166ab84b26..63d64e9f97c 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -5813,7 +5813,7 @@ main (argc, argv)
rlim.rlim_cur = rlim.rlim_max;
setrlimit (RLIMIT_STACK, &rlim);
}
-#endif /* RLIMIT_STACK defined */
+#endif
obstack_init (rtl_obstack);
obstack_init (hash_obstack);
diff --git a/gcc/install.texi b/gcc/install.texi
index 2c9bdf31554..9d8e36345f9 100644
--- a/gcc/install.texi
+++ b/gcc/install.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1988,89,92,93,94,95,96,97 Free Software Foundation, Inc.
+@c Copyright (C) 1988,89,92,93,94,95,96,97,1998 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -534,12 +534,51 @@ since they usually run faster than the ones compiled with some other
compiler.)
@item
+@cindex C++ runtime library
+@cindex @code{libstdc++}
If you're going to use C++, it's likely that you need to also install
-the libg++ distribution. It should be available from the same
-place where you got the GNU C distribution. Just as GNU C does not
-distribute a C runtime library, it also does not include a C++ run-time
+a C++ runtime library. Just as GNU C does not
+distribute a C runtime library, it also does not include a C++ runtime
library. All I/O functionality, special class libraries, etc., are
-available in the libg++ distribution.
+provided by the C++ runtime library.
+
+Here's one way to build and install a C++ runtime library for GNU CC:
+
+@itemize @bullet
+@item
+Build and install GNU CC, so that invoking @samp{gcc} obtains the GNU CC
+that was just built.
+
+@item
+Obtain a copy of a compatible @samp{libstdc++} distribution. For
+example, the @samp{libstdc++-2.8.0.tar.gz} distribution should be
+compatible with GCC 2.8.0. GCC distributors normally distribute
+@samp{libstdc++} as well.
+
+@item
+Set the @samp{CXX} environment variable to @samp{gcc} while running the
+@samp{libstdc++} distribution's @file{configure} command. Use the same
+@file{configure} options that you used when you invoked GCC's
+@file{configure} command.
+
+@item
+Invoke @samp{make} to build the C++ runtime.
+
+@item
+Invoke @samp{make install} to install the C++ runtime.
+
+@end itemize
+
+To summarize, after building and installing GNU CC, invoke the following
+shell commands in the topmost directory of the C++ library distribution.
+For @var{configure-options}, use the same options that
+you used to configure GNU CC.
+
+@example
+$ CXX=gcc ./configure @var{configure-options}
+$ make
+$ make install
+@end example
@item
GNU CC includes a runtime library for Objective-C because it is an
@@ -2027,8 +2066,8 @@ $ assign /system /translation=concealed -
@noindent
with the appropriate disk and directory name. If you are going to be
-using libg++, this is where the libg++ install procedure will install
-the libg++ header files.
+using a C++ runtime library, this is where its install procedure will install
+its header files.
@item
Obtain the file @file{gcc-cc1plus.exe}, and place this in the same
@@ -2297,7 +2336,7 @@ are already suitable for ANSI C and GNU CC, nothing special need be
done).
@code{GPLUS_INCLUDE_DIR} means the same thing for native and cross. It
-is where @code{g++} looks first for header files. @code{libg++}
+is where @code{g++} looks first for header files. The C++ library
installs only target independent header files in that directory.
@code{LOCAL_INCLUDE_DIR} is used only for a native compiler. It is
diff --git a/gcc/invoke.texi b/gcc/invoke.texi
index d1f8756c417..1e42e94aa5e 100644
--- a/gcc/invoke.texi
+++ b/gcc/invoke.texi
@@ -5357,7 +5357,7 @@ make it more readable. This option is generally only of use to those
who actually need to read the generated assembly code (perhaps while
debugging the compiler itself).
-@samp{-fverbose-asm} is the default. @samp{-fno-verbose-asm} causes the
+@samp{-fno-verbose-asm}, the default, causes the
extra information to be omitted and is useful when comparing two assembler
files.
diff --git a/gcc/jump.c b/gcc/jump.c
index 8d097da226e..ba484d175e6 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1,5 +1,5 @@
/* Optimize jump instructions, for GNU compiler.
- Copyright (C) 1987, 88, 89, 91-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 91-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1160,8 +1160,11 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
There is no point in using the old value of TEMP1 if
it is a register, since cse will alias them. It can
lose if the old value were a hard register since CSE
- won't replace hard registers. */
- && (((temp3 = reg_set_last (temp1, insn)) != 0)
+ won't replace hard registers. Avoid using TEMP3 if
+ small register classes and it is a hard register. */
+ && (((temp3 = reg_set_last (temp1, insn)) != 0
+ && ! (SMALL_REGISTER_CLASSES && GET_CODE (temp3) == REG
+ && REGNO (temp3) < FIRST_PSEUDO_REGISTER))
/* 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
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index cd656760d16..21301f52cdc 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -2717,6 +2717,45 @@ __enable_execute_stack ()
#endif /* __sysV88__ */
+#ifdef __sysV68__
+
+#include <sys/signal.h>
+#include <errno.h>
+
+/* Motorola forgot to put memctl.o in the libp version of libc881.a,
+ so define it here, because we need it in __clear_insn_cache below */
+
+asm("\n\
+ global memctl\n\
+memctl:\n\
+ movq &75,%d0\n\
+ trap &0\n\
+ bcc.b noerror\n\
+ jmp cerror%\n\
+noerror:\n\
+ movq &0,%d0\n\
+ rts");
+
+/* Clear instruction cache so we can call trampolines on stack.
+ This is called from FINALIZE_TRAMPOLINE in mot3300.h. */
+
+void
+__clear_insn_cache ()
+{
+ int save_errno;
+
+ /* Preserve errno, because users would be surprised to have
+ errno changing without explicitly calling any system-call. */
+ save_errno = errno;
+
+ /* Keep it simple : memctl (MCT_TEXT) always fully clears the insn cache.
+ No need to use an address derived from _start or %sp, as 0 works also. */
+ memctl(0, 4096, MCT_TEXT);
+ errno = save_errno;
+}
+
+#endif /* __sysV68__ */
+
#ifdef __pyr__
#undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. */
@@ -3634,6 +3673,7 @@ label:
#endif /* DWARF2_UNWIND_INFO */
#endif /* L_eh */
+
#ifdef L_pure
#ifndef inhibit_libc
diff --git a/gcc/md.texi b/gcc/md.texi
index d1c29096482..7deeb3e077b 100644
--- a/gcc/md.texi
+++ b/gcc/md.texi
@@ -2465,6 +2465,15 @@ will not normally need to define this pattern. A typical reason why you
might need this pattern is if some value, such as a pointer to a global
table, must be restored after control flow is branched to the handler of
an exception. There are no arguments.
+
+@cindex @code{builtin_setjmp_receiver} instruction pattern
+@item @samp{builtin_setjmp_receiver}
+This pattern, if defined, contains code needed at the site of an
+builtin setjmp that isn't needed at the site of a nonlocal goto. You
+will not normally need to define this pattern. A typical reason why you
+might need this pattern is if some value, such as a pointer to a global
+table, must be restored. This pattern is called immediate after the
+call to @code{__dummy} has been emitted. There are no arguments.
@end table
@node Pattern Ordering
diff --git a/gcc/pexecute.c b/gcc/pexecute.c
index 7f1ac4021eb..5c2779fcc22 100644
--- a/gcc/pexecute.c
+++ b/gcc/pexecute.c
@@ -1,6 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index d95945e635b..a18afe3fc81 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -531,10 +531,14 @@ plain_type_1 (type, level)
{
char *name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
+ if (!strcmp (name, "char"))
+ return T_CHAR;
if (!strcmp (name, "unsigned char"))
return T_UCHAR;
if (!strcmp (name, "signed char"))
return T_CHAR;
+ if (!strcmp (name, "int"))
+ return T_INT;
if (!strcmp (name, "unsigned int"))
return T_UINT;
if (!strcmp (name, "short int"))
@@ -547,12 +551,12 @@ plain_type_1 (type, level)
return T_ULONG;
}
+ if (size == INT_TYPE_SIZE)
+ return (TREE_UNSIGNED (type) ? T_UINT : T_INT);
if (size == CHAR_TYPE_SIZE)
return (TREE_UNSIGNED (type) ? T_UCHAR : T_CHAR);
if (size == SHORT_TYPE_SIZE)
return (TREE_UNSIGNED (type) ? T_USHORT : T_SHORT);
- if (size == INT_TYPE_SIZE)
- return (TREE_UNSIGNED (type) ? T_UINT : T_INT);
if (size == LONG_TYPE_SIZE)
return (TREE_UNSIGNED (type) ? T_ULONG : T_LONG);
if (size == LONG_LONG_TYPE_SIZE) /* better than nothing */
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 78e5b543494..c0e400b06cb 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1574,7 +1574,10 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
body = gen_rtx (ASM_OPERANDS, VOIDmode,
TREE_STRING_POINTER (string), "", 0, argvec, constraints,
filename, line);
- MEM_VOLATILE_P (body) = vol;
+
+ /* The only use of BODY is if no outputs are specified, so set
+ it volatile, at least for now. */
+ MEM_VOLATILE_P (body) = 1;
/* Eval the inputs and put them into ARGVEC.
Put their constraints into ASM_INPUTs and store in CONSTRAINTS. */
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 10f6f48e8d8..b0ffcd713e8 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -630,10 +630,10 @@ int flag_inhibit_size_directive = 0;
the generated assembly code (to make it more readable). This option
is generally only of use to those who actually need to read the
generated assembly code (perhaps while debugging the compiler itself).
- -fverbose-asm is the default. -fno-verbose-asm causes the extra information
+ -fno-verbose-asm, the default, causes the extra information
to be omitted and is useful when comparing two assembler files. */
-int flag_verbose_asm = 1;
+int flag_verbose_asm = 0;
/* -dA causes debug commentary information to be produced in
the generated assembly code (to make it more readable). This option
@@ -3842,7 +3842,7 @@ main (argc, argv, envp)
rlim.rlim_cur = rlim.rlim_max;
setrlimit (RLIMIT_STACK, &rlim);
}
-#endif /* RLIMIT_STACK */
+#endif
signal (SIGFPE, float_signal);
diff --git a/gcc/version.c b/gcc/version.c
index 0d5ae3dca8f..cef94028ac3 100644
--- a/gcc/version.c
+++ b/gcc/version.c
@@ -1 +1 @@
-char *version_string = "egcs-2.91.03 971225 (gcc-2.8.0)";
+char *version_string = "egcs-2.91.03 971225 (gcc-2.8.0 release)";