aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/vms.h5
-rw-r--r--gcc/config/arm/arm.c1
-rw-r--r--gcc/config/i386/bsd386.h8
-rw-r--r--gcc/config/i386/i386.h5
-rw-r--r--gcc/config/i386/sco5.h7
-rw-r--r--gcc/config/i386/sol2.h2
-rw-r--r--gcc/config/i386/x-sco53
-rw-r--r--gcc/config/i386/xm-sco5.h6
-rw-r--r--gcc/config/i960/i960.c4
-rw-r--r--gcc/config/m68k/m68k.h6
-rw-r--r--gcc/config/m68k/mot3300-crt0.S27
-rw-r--r--gcc/config/m68k/mot3300.h36
-rw-r--r--gcc/config/m68k/mot3300Mcrt0.S47
-rw-r--r--gcc/config/m68k/xm-mot3300.h4
-rw-r--r--gcc/config/m88k/m88k.c8
-rw-r--r--gcc/config/m88k/xm-sysv3.h6
-rw-r--r--gcc/config/mips/mips.h9
-rw-r--r--gcc/config/mips/mips.md12
-rw-r--r--gcc/config/mips/news4.h6
-rw-r--r--gcc/config/mips/ultrix.h12
-rw-r--r--gcc/config/mips/xm-iris5.h8
-rw-r--r--gcc/config/ptx4.h6
-rw-r--r--gcc/config/rs6000/rs6000.c27
-rw-r--r--gcc/config/rs6000/rs6000.h9
-rw-r--r--gcc/config/rs6000/sysv4.h8
-rw-r--r--gcc/config/rs6000/x-rs60001
-rw-r--r--gcc/config/sh/sh.md2
-rw-r--r--gcc/config/sparc/sol2.h4
-rw-r--r--gcc/config/sparc/sparc.c88
-rw-r--r--gcc/config/sparc/sparc.md25
-rw-r--r--gcc/config/svr4.h12
-rw-r--r--gcc/config/vax/xm-vms.h3
32 files changed, 266 insertions, 141 deletions
diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h
index 01663e342b9..8e4fd6dc858 100644
--- a/gcc/config/alpha/vms.h
+++ b/gcc/config/alpha/vms.h
@@ -29,13 +29,10 @@ Boston, MA 02111-1307, USA. */
#include "alpha/alpha.h"
-/* Predefine this in CPP because VMS limits the size of command options
- and GNU CPP is not used on VMS except with GNU C. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-Dalpha -D__ALPHA -Dvms -DVMS -D__alpha__ -D__alpha -D__vms__ -D__VMS__\
- -D__VMS_VER=70000022 \
- -D__GNUC__=2 -D__GNUC_MINOR__=7 -Asystem(vms) -Acpu(alpha) -Amachine(alpha)"
+ -Asystem(vms) -Acpu(alpha) -Amachine(alpha)"
#undef CPP_SPEC
#define CPP_SPEC "\
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 935a2e06404..d64fe59e2ac 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"
@@ -16,3 +16,7 @@
#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 " #"
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 9bfef4e98b2..6fb08a120d2 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1524,8 +1524,9 @@ do { \
\
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \
if ((regs_ever_live[regno] && ! call_used_regs[regno]) \
- || (current_function_uses_pic_offset_table \
- && regno == PIC_OFFSET_TABLE_REGNUM)) \
+ || ((current_function_uses_pic_offset_table \
+ || current_function_uses_const_pool) \
+ && flag_pic && regno == PIC_OFFSET_TABLE_REGNUM)) \
offset += 4; \
\
(OFFSET) = offset + get_frame_size (); \
diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h
index 6474faeff10..5306000e2a0 100644
--- a/gcc/config/i386/sco5.h
+++ b/gcc/config/i386/sco5.h
@@ -1,5 +1,5 @@
/* Definitions for Intel 386 running SCO Unix System V 3.2 Version 5.
- Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Kean Johnston (hug@netcom.com)
This file is part of GNU CC.
@@ -828,12 +828,11 @@ dtors_section () \
%{!Xc:%{Xk:values-Xk.o%s} \
%{!Xk:%{Xt:values-Xt.o%s} \
%{!Xt:values-Xa.o%s}}}}}} \
- %{mcoff:crtbeginS.o%s} \
- %{!mcoff:%{!static:crtbegin.o%s}%{static:crtbeginS.o%s}}"
+ %{mcoff:crtbeginS.o%s} %{!mcoff:crtbegin.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
- "%{!mcoff:%{!static:crtend.o%s}%{static:crtendS.o%s}} \
+ "%{!mcoff:crtend.o%s} \
%{mcoff:crtendS.o%s} \
%{pg:gcrtn.o%s}%{!pg:crtn.o%s}"
diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h
index ccf4a949307..64172359c4e 100644
--- a/gcc/config/i386/sol2.h
+++ b/gcc/config/i386/sol2.h
@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
executed. This macro forces the assembler to do the padding, since
it knows what it is doing. */
-#define FORCE_INIT_SECTION_ALIGN do { asm (ALIGN_ASM_OP ## " 16"); } while (0)
+#define FORCE_INIT_SECTION_ALIGN asm (ALIGN_ASM_OP ## " 16")
#define FORCE_FINI_SECTION_ALIGN FORCE_INIT_SECTION_ALIGN
/* Add "sun" to the list of symbols defined for SVR4. */
diff --git a/gcc/config/i386/x-sco5 b/gcc/config/i386/x-sco5
index ada44eda382..276d74045ed 100644
--- a/gcc/config/i386/x-sco5
+++ b/gcc/config/i386/x-sco5
@@ -3,7 +3,8 @@ RANLIB_TEST = false
CC = cc
OLDCC = cc
CCLIBFLAGS =
-CLIB = -lPW
+# We avoid the ALLOCA in -lPW becuase it gives us an evil index()
+ALLOCA = alloca.o
# See all the declarations.
FIXPROTO_DEFINES = -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2
diff --git a/gcc/config/i386/xm-sco5.h b/gcc/config/i386/xm-sco5.h
index 78c66a87bc5..99bc53c2bc5 100644
--- a/gcc/config/i386/xm-sco5.h
+++ b/gcc/config/i386/xm-sco5.h
@@ -10,3 +10,9 @@
#define sys_siglist _sys_siglist
#undef SYS_SIGLIST_DECLARED
#define SYS_SIGLIST_DECLARED
+
+/* If not compiled with GNU C, use the portable alloca. */
+#ifndef __GNUC__
+#define USE_C_ALLOCA
+#endif
+
diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c
index 6adb2c30d6f..6e86645fe61 100644
--- a/gcc/config/i960/i960.c
+++ b/gcc/config/i960/i960.c
@@ -35,7 +35,6 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "tree.h"
#include "insn-codes.h"
-#include "assert.h"
#include "expr.h"
#include "except.h"
#include "function.h"
@@ -2241,7 +2240,8 @@ i960_arg_size_and_align (mode, type, size_out, align_out)
else if (mode == VOIDmode)
{
/* End of parm list. */
- assert (type != 0 && TYPE_MODE (type) == VOIDmode);
+ if (type == 0 || TYPE_MODE (type) != VOIDmode)
+ abort ();
size = 1;
}
else
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index 486ca781408..654f24c7b57 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -1223,7 +1223,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-crt0.S b/gcc/config/m68k/mot3300-crt0.S
index e9fc1d463b5..3c1648fe053 100644
--- a/gcc/config/m68k/mot3300-crt0.S
+++ b/gcc/config/m68k/mot3300-crt0.S
@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
# define FILE(n) file n
# define GLOBAL_SYM(s) global s
# define LOCAL_LABEL(l) L%##l
-# define SECTION(n) section n
+# define IDENT(s) ident s
# define TEXT text
#else /* Assume we are using GNU as. */
# define COMM .comm
@@ -35,8 +35,7 @@ Boston, MA 02111-1307, USA. */
# define FILE(name) .file name
# define GLOBAL_SYM(s) .globl s
# define LOCAL_LABEL(l) .L.##l
-# define SECTION(n) .section n
-# define STRING(s) .asciz s
+# define IDENT(s) .section .comment;.asciz s
# define TEXT .text
#endif
@@ -86,24 +85,14 @@ LOCAL_LABEL(isatty):
trap &0
nop
+ GLOBAL_SYM (__stop_monitor)
+__stop_monitor:
+ rts
EVEN
COMM splimit%,4
COMM environ,4
- COMM mcount,4
- COMM mcount%,4
- COMM monitor,4
-
-#ifdef STRING
- SECTION (.comment)
- STRING ("$Id: mot3300-crt0.S,v 1.1 1997/08/11 15:57:32 law Exp $\n")
- STRING ("Contributed by manfred@lts.sel.alcatel.de (Manfred Hollstein, Germany)\n")
-#else
- byte 'C,'o,'n,'t,'r,'i,'b,'u,'t,'e,'d,' ,'b,'y
- byte ' ,'m,'a,'n,'f,'r,'e,'d,'@,'l,'t,'s,'.,'s
- byte 'e,'l,'.,'a,'l,'c,'a,'t,'e,'l,'.,'d,'e,'
- byte '(,'M,'a,'n,'f,'r,'e,'d,' ,'H,'o,'l,'l,'s
- byte 't,'e,'i,'n,',,' ,'G,'e,'r,'m,'a,'n,'y,')
- byte 10,0
-#endif
+ IDENT ("$Id: mot3300-crt0.S,v 1.2 1997/12/22 23:41:12 kenner Exp $")
+ IDENT ("Contributed by Manfred Hollstein (manfred@lts.sel.alcatel.de)")
+ IDENT ("Corrections by Philippe De Muyter (phdm@macqel.be)")
diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h
index f7d35847b26..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. */
@@ -356,7 +351,7 @@ dtors_section () \
#undef ASM_BYTE
#define ASM_BYTE ".byte"
#undef ASM_BYTE_OP
-#define ASM_BYTE_OP "\t.byte"
+#define ASM_BYTE_OP ".byte"
#else
#undef ASM_LONG
#define ASM_LONG "long"
@@ -367,7 +362,7 @@ dtors_section () \
#undef ASM_BYTE
#define ASM_BYTE "byte"
#undef ASM_BYTE_OP
-#define ASM_BYTE_OP "\tbyte"
+#define ASM_BYTE_OP "byte"
#endif /* USE_GAS */
/* The sysV68 as doesn't know about double's and float's. */
@@ -476,7 +471,7 @@ do { long l; \
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
do { register int sp = 0, lp = 0; \
- fprintf ((FILE), "%s\t", ASM_BYTE_OP); \
+ fprintf ((FILE), "\t%s\t", ASM_BYTE_OP); \
loop: \
if ((PTR)[sp] > ' ' && ! ((PTR)[sp] & 0x80) && (PTR)[sp] != '\\') \
{ lp += 3; \
@@ -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/m68k/mot3300Mcrt0.S b/gcc/config/m68k/mot3300Mcrt0.S
index acb317c92fe..3ef6611630c 100644
--- a/gcc/config/m68k/mot3300Mcrt0.S
+++ b/gcc/config/m68k/mot3300Mcrt0.S
@@ -1,5 +1,5 @@
/* The start module mcrt0.s for the SysV68 Motorola 3300 Delta Series.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Manfred Hollstein (manfred@lts.sel.alcatel.de).
This file is part of GNU CC.
@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
# define FILE(n) file n
# define GLOBAL_SYM(s) global s
# define LOCAL_LABEL(l) L%##l
-# define SECTION(n) section n
+# define IDENT(s) ident s
# define TEXT text
#else /* Assume we are using GNU as. */
# define COMM .comm
@@ -35,8 +35,7 @@ Boston, MA 02111-1307, USA. */
# define FILE(name) .file name
# define GLOBAL_SYM(s) .globl s
# define LOCAL_LABEL(l) .L.##l
-# define SECTION(n) .section n
-# define STRING(s) .asciz s
+# define IDENT(s) .section .comment;.asciz s
# define TEXT .text
#endif
@@ -110,30 +109,27 @@ LOCAL_LABEL(isatty):
jsr exit
_exit: moveq &1,%d0
trap &0
-
- GLOBAL_SYM (mcount)
- EVEN
-mcount: bra mcount%
+ GLOBAL_SYM (__stop_monitor)
+__stop_monitor:
+ clr.l -(%sp)
+ jsr monitor
+ add.w &4,%sp
+ rts
LOCAL_LABEL(errtxt):
-#ifdef STRING
- STRING ("No space for monitor buffer\n")
-#else
byte 'N,'o,' ,'s,'p,'a,'c,'e,' ,'f,'o,'r,' ,'m,'o,'n
- byte 'i,'t,'o,'r,' ,'b,'u,'f,'f,'e,'r,'\n,0
-#endif
+ byte 'i,'t,'o,'r,' ,'b,'u,'f,'f,'e,'r,'\n
+LOCAL_LABEL(errtxt_end):
EVEN
LOCAL_LABEL(3):
- mov.l &28,-(%sp)
- mov.l &LOCAL_LABEL(errtxt),-(%sp)
- moveq &2,%d0
- mov.l %d0,-(%sp)
+ pea LOCAL_LABEL(errtxt_end)-LOCAL_LABEL(errtxt)
+ pea LOCAL_LABEL(errtxt)(%pc)
+ pea 2
jsr write
bra.b _exit
LOCAL_LABEL(endofstart):
- nop
EVEN
@@ -141,15 +137,6 @@ LOCAL_LABEL(endofstart):
COMM environ,4
COMM _countbase,4
-#ifdef STRING
- SECTION (.comment)
- STRING ("$Id: mot3300Mcrt0.S,v 1.1 1997/08/11 15:57:32 law Exp $\n")
- STRING ("Contributed by manfred@lts.sel.alcatel.de (Manfred Hollstein, Germany)\n")
-#else
- byte 'C,'o,'n,'t,'r,'i,'b,'u,'t,'e,'d,' ,'b,'y
- byte ' ,'m,'a,'n,'f,'r,'e,'d,'@,'l,'t,'s,'.,'s
- byte 'e,'l,'.,'a,'l,'c,'a,'t,'e,'l,'.,'d,'e,'
- byte '(,'M,'a,'n,'f,'r,'e,'d,' ,'H,'o,'l,'l,'s
- byte 't,'e,'i,'n,',,' ,'G,'e,'r,'m,'a,'n,'y,')
- byte 10,0
-#endif
+ IDENT ("$Id: mot3300Mcrt0.S,v 1.2 1997/12/22 23:39:48 kenner Exp $")
+ IDENT ("Contributed by Manfred Hollstein (manfred@lts.sel.alcatel.de)")
+ IDENT ("Corrections by Philippe De Muyter (phdm@macqel.be)")
diff --git a/gcc/config/m68k/xm-mot3300.h b/gcc/config/m68k/xm-mot3300.h
index 8f4c0a46bf9..c61bd293e25 100644
--- a/gcc/config/m68k/xm-mot3300.h
+++ b/gcc/config/m68k/xm-mot3300.h
@@ -40,3 +40,7 @@ extern char *alloca ();
#define __PTR_TO_INT(P) ((int)(P))
#define __INT_TO_PTR(P) ((char *)(P))
+
+/* We need POSIX/XOPEN symbols; otherwise make check will fail. */
+#define ADD_MISSING_POSIX 1
+#define ADD_MISSING_XOPEN 1
diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c
index 5475b5775c7..7c2debe018e 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 05d3e4cf4d4..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.
@@ -28,3 +28,7 @@ Boston, MA 02111-1307, USA. */
/* for the emacs version of alloca */
#define STACK_DIRECTION -1
+
+/* We need POSIX/XOPEN symbols; otherwise make check will fail. */
+#define ADD_MISSING_POSIX 1
+#define ADD_MISSING_XOPEN 1
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 348a4250b55..557fb09878c 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2349,6 +2349,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
@@ -2372,7 +2379,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 1a3e2ce22ce..8b81221ea3f 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -6459,6 +6459,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/mips/news4.h b/gcc/config/mips/news4.h
index f7c464cf353..9f816c19258 100644
--- a/gcc/config/mips/news4.h
+++ b/gcc/config/mips/news4.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips)
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -33,4 +33,8 @@ Boston, MA 02111-1307, USA. */
#define MACHINE_TYPE "RISC NEWS-OS"
+/* INITIALIZE_TRAMPOLINE calls this library function to flush
+ program and data caches. */
+#define CACHE_FLUSH_FUNC "cacheflush"
+
#include "mips/mips.h"
diff --git a/gcc/config/mips/ultrix.h b/gcc/config/mips/ultrix.h
index cb18a5d4eba..7fb101a9151 100644
--- a/gcc/config/mips/ultrix.h
+++ b/gcc/config/mips/ultrix.h
@@ -1,5 +1,5 @@
-/* Definitions of target machine for GNU compiler. DECstation (ultrix) version.
- Copyright (C) 1991 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler; DECstation (Ultrix) version.
+ Copyright (C) 1991, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -46,4 +46,12 @@ Boston, MA 02111-1307, USA. */
/* Generate calls to memcpy, etc., not bcopy, etc. */
#define TARGET_MEM_FUNCTIONS
+/* Work around assembler forward label references generated in exception
+ handling code. */
+#define DWARF2_UNWIND_INFO 0
+
+/* INITIALIZE_TRAMPOLINE calls this library function to flush
+ program and data caches. */
+#define CACHE_FLUSH_FUNC "cacheflush"
+
#include "mips/mips.h"
diff --git a/gcc/config/mips/xm-iris5.h b/gcc/config/mips/xm-iris5.h
index 448b7ac80bb..f3eb9cdb753 100644
--- a/gcc/config/mips/xm-iris5.h
+++ b/gcc/config/mips/xm-iris5.h
@@ -1,3 +1,11 @@
#include "mips/xm-mips.h"
#define USG
+
+/* On SGI IRIX 5.3, inttypes.h clashes with sys/types.h, but the clash
+ (when compiled with GCC) is a warning, so configure.in thinks it's OK
+ to use it. Work around this problem. */
+
+#ifdef HAVE_INTTYPES_H
+#undef HAVE_INTTYPES_H
+#endif
diff --git a/gcc/config/ptx4.h b/gcc/config/ptx4.h
index 64d5e0b5752..db761655674 100644
--- a/gcc/config/ptx4.h
+++ b/gcc/config/ptx4.h
@@ -123,7 +123,7 @@ Boston, MA 02111-1307, USA.
support here for as many of the other svr4 linker options as seems
reasonable, given that some of them conflict with options for other
svr4 tools (e.g. the assembler). In particular, we do support the
- -h*, -z*, -V, -b, -t, -Qy, -Qn, and -YP* options here, and the -e*,
+ -z*, -V, -b, -t, -Qy, -Qn, and -YP* options here, and the -e*,
-l*, -o*, -r, -s, -u*, and -L* options are directly supported
by gcc.c itself. We don't directly support the -m (generate load
map) option because that conflicts with the -m (run m4) option of
@@ -143,8 +143,8 @@ Boston, MA 02111-1307, USA.
#define LINK_SPEC "%{h*} %{v:-V} \
%{b} %{Wl,*:%*} \
%{static:-dn -Bstatic} \
- %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \
- %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \
+ %{shared:-G -dy -z text} \
+ %{symbolic:-Bsymbolic -G -dy -z text} \
%{G:-G} \
%{YP,*} \
%{!YP,*:%{p:-Y P,/lib/libp:/usr/lib/libp:/lib:/usr/lib} \
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 2dbdb923538..34964a50fba 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1167,6 +1167,33 @@ init_cumulative_args (cum, fntype, libname, incoming)
}
}
+/* If defined, a C expression which determines whether, and in which
+ direction, to pad out an argument with extra space. The value
+ should be of type `enum direction': either `upward' to pad above
+ the argument, `downward' to pad below, or `none' to inhibit
+ padding.
+
+ For the AIX ABI structs are always stored left shifted in their
+ argument slot. */
+
+enum direction
+function_arg_padding (mode, type)
+ enum machine_mode mode;
+ tree type;
+{
+ if (type != 0 && AGGREGATE_TYPE_P (type))
+ return upward;
+
+ /* This is the default definition. */
+ return (! 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));
+}
+
/* If defined, a C expression that gives the alignment boundary, in bits,
of an argument with the specified mode and type. If it is not defined,
PARM_BOUNDARY is used for all arguments.
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index d30af75f155..087ac5ad8ce 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1461,6 +1461,15 @@ typedef struct rs6000_args
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
function_arg_pass_by_reference(&CUM, MODE, TYPE, NAMED)
+/* If defined, a C expression which determines whether, and in which
+ direction, to pad out an argument with extra space. The value
+ should be of type `enum direction': either `upward' to pad above
+ the argument, `downward' to pad below, or `none' to inhibit
+ padding. */
+
+#define FUNCTION_ARG_PADDING(MODE, TYPE) \
+ function_arg_padding (MODE, TYPE)
+
/* If defined, a C expression that gives the alignment boundary, in bits,
of an argument with the specified mode and type. If it is not defined,
PARM_BOUNDARY is used for all arguments. */
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index e9a88a2d15a..1fdd2f032d8 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -1035,8 +1035,8 @@ do { \
%{!static: %(link_path) %{!R*:%{L*:-R %*}}} \
%{mshlib: } \
%{static:-dn -Bstatic} \
-%{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \
-%{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}}"
+%{shared:-G -dy -z text} \
+%{symbolic:-Bsymbolic -G -dy -z text}"
#else
/* Shared libraries are not default. */
@@ -1044,8 +1044,8 @@ do { \
%{mshlib: %(link_path) } \
%{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
%{static: } \
-%{shared:-G -dy -z text %{!h*:%{o*:-h %*}} %(link_path) } \
-%{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}} %(link_path) }"
+%{shared:-G -dy -z text %(link_path) } \
+%{symbolic:-Bsymbolic -G -dy -z text %(link_path) }"
#endif
/* Override the default target of the linker. */
diff --git a/gcc/config/rs6000/x-rs6000 b/gcc/config/rs6000/x-rs6000
index ecfc0899079..0d8f3113fb5 100644
--- a/gcc/config/rs6000/x-rs6000
+++ b/gcc/config/rs6000/x-rs6000
@@ -1,5 +1,4 @@
# configuration for IBM rs6000 running aix
-INSTALL=/usr/ucb/install -c
# Show we need to use the C version of ALLOCA
ALLOCA=alloca.o
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index ae49456a966..35432aa665d 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -1,5 +1,5 @@
;;- Machine description for the Hitachi SH.
-;; Copyright (C) 1993, 1994, 1995, 1997Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
;; Contributed by Steve Chamberlain (sac@cygnus.com).
;; Improved by Jim Wilson (wilson@cygnus.com).
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index fe4e98c3c03..ff3339d0f1f 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -142,8 +142,8 @@ Boston, MA 02111-1307, USA. */
"%{h*} %{v:-V} \
%{b} %{Wl,*:%*} \
%{static:-dn -Bstatic} \
- %{shared:-G -dy %{!mimpure-text:-z text} %{!h*:%{o*:-h %*}}} \
- %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \
+ %{shared:-G -dy %{!mimpure-text:-z text}} \
+ %{symbolic:-Bsymbolic -G -dy -z text} \
%{G:-G} \
%{YP,*} \
%{R*} \
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 692ba41f790..58da5ac35fc 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));
}
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 8ec12f5197a..6efa3320852 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -5014,7 +5014,21 @@
(define_insn "jump"
[(set (pc) (label_ref (match_operand 0 "" "")))]
""
- "b%* %l0%("
+ "*
+{
+ /* Some implementations are reported to have problems with
+ foo: b,a foo
+ i.e. an empty loop with the annul bit set. The workaround is to use
+ foo: b foo; nop
+ instead. */
+
+ if (flag_delayed_branch
+ && (insn_addresses[INSN_UID (operands[0])]
+ == insn_addresses[INSN_UID (insn)]))
+ return \"b %l0%#\";
+ else
+ return \"b%* %l0%(\";
+}"
[(set_attr "type" "uncond_branch")])
(define_expand "tablejump"
@@ -6136,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 d70aa117558..a7f5a37beb8 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 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GNU CC.
@@ -141,7 +141,7 @@ Boston, MA 02111-1307, USA.
support here for as many of the other svr4 linker options as seems
reasonable, given that some of them conflict with options for other
svr4 tools (e.g. the assembler). In particular, we do support the
- -h*, -z*, -V, -b, -t, -Qy, -Qn, and -YP* options here, and the -e*,
+ -z*, -V, -b, -t, -Qy, -Qn, and -YP* options here, and the -e*,
-l*, -o*, -r, -s, -u*, and -L* options are directly supported
by gcc.c itself. We don't directly support the -m (generate load
map) option because that conflicts with the -m (run m4) option of
@@ -162,8 +162,8 @@ Boston, MA 02111-1307, USA.
#define LINK_SPEC "%{h*} %{v:-V} \
%{b} %{Wl,*:%*} \
%{static:-dn -Bstatic} \
- %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \
- %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \
+ %{shared:-G -dy -z text} \
+ %{symbolic:-Bsymbolic -G -dy -z text} \
%{G:-G} \
%{YP,*} \
%{Qy:} %{!Qn:-Qy}"
@@ -171,8 +171,8 @@ Boston, MA 02111-1307, USA.
#define LINK_SPEC "%{h*} %{v:-V} \
%{b} %{Wl,*:%*} \
%{static:-dn -Bstatic} \
- %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \
- %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \
+ %{shared:-G -dy -z text} \
+ %{symbolic:-Bsymbolic -G -dy -z text} \
%{G:-G} \
%{YP,*} \
%{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
diff --git a/gcc/config/vax/xm-vms.h b/gcc/config/vax/xm-vms.h
index ba87e656d39..a559a039476 100644
--- a/gcc/config/vax/xm-vms.h
+++ b/gcc/config/vax/xm-vms.h
@@ -26,6 +26,9 @@ Boston, MA 02111-1307, USA. */
#define STDC_HEADERS 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
+#ifdef __DECC
+#define HAVE_UNISTD_H 1
+#endif
#if defined(VAXC) || defined(__DECC)
/* if compiling with VAXC, need to fix problem with <stdio.h>