pull in most recent patches to gcc-2.95.3 from the netbsd-1-6

branch.  Includes fixes for sparc, alpha, and others.
Should help in keeping pkgsrc running on 1.5.* systems.
The patches which mirror those in the main netbsd source tree have
been all put into a single distribution patch file.  This makes
it much easier to maintain and easier to easily see which patches
are specific to pkgsrc.
This commit is contained in:
dmcmahill 2002-08-12 01:53:34 +00:00
parent d47d70a623
commit 7d47e28417
71 changed files with 43 additions and 14889 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.43 2002/08/06 23:44:36 kristerw Exp $
# $NetBSD: Makefile,v 1.44 2002/08/12 01:53:34 dmcmahill Exp $
# Make sure that the version number in "Makefile.gcc" matches this.
DISTNAME= gcc-2.95.3
@ -13,6 +13,9 @@ MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
COMMENT= GNU Compiler Collection
PATCH_SITES= ${MASTER_SITE_LOCAL}
PATCHFILES= gcc-2.95.3-diff-2002-08-11.gz
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
USE_GMAKE= YES

View file

@ -1,72 +1,7 @@
$NetBSD: distinfo,v 1.11 2002/03/31 08:05:51 jmc Exp $
$NetBSD: distinfo,v 1.12 2002/08/12 01:53:35 dmcmahill Exp $
SHA1 (gcc-2.95.3.tar.gz) = 535d27038d161c0e7c2662702e11a48aa97ef622
Size (gcc-2.95.3.tar.gz) = 12911721 bytes
SHA1 (patch-aa) = 92e1f8ee1bd0873417fe3768d25b0a3d5f97cb23
SHA1 (patch-ab) = 06bf6155ace97794578a827f1ed66afed75aa8e9
SHA1 (patch-ac) = aa4b7d81ac28b47a9f25ad8bae40c8e0c6184c97
SHA1 (patch-ad) = 9eb1a304e432515ba62a1fc7e80920e89c30aa3d
SHA1 (patch-ae) = 59035f3c62300e6190cfffb49a49b28e90939f41
SHA1 (patch-af) = 85bd1eeffb2a84bff06be8b3cb73091b1d50bc60
SHA1 (patch-ag) = 0c76dd4e1f83ef0e3109986df851df832a73f068
SHA1 (patch-ah) = 664c351a65ee004c2d616e067f150e6c42db630c
SHA1 (patch-ai) = 59dde4be91730982a3dac34dc9199db83f519831
SHA1 (patch-aj) = 8e57bc177d850bb69546db9bd9527b64bd265ef7
SHA1 (patch-ak) = 673a5abe55a56897f24d5c306805317cdd83baaa
SHA1 (patch-al) = 58e6d8fa40e39acca85f1a2b00f3a36180fa14f4
SHA1 (patch-am) = bc595b708d54d4d694fab4972b8596ca06f26039
SHA1 (patch-an) = 75baa5521a5a775efc7ac633953996cd09d044e1
SHA1 (patch-ao) = 9fbce4eaf53e943d040f41c8569d754af46f50f0
SHA1 (patch-ap) = 5adcf97fd2c45c825ac7b3835aed61ef87f5255c
SHA1 (patch-aq) = 6a377322b24ad69cb9c30bf879f2a9481907ce98
SHA1 (patch-ar) = 4af86f853521e77bf5ce7ec0e2f840a676595330
SHA1 (patch-as) = f0ad0f4f0b60630f414548a1dbcc5e149a5abba2
SHA1 (patch-at) = 0711ee4a4f865861c8e2ed13681ed75077b0ca9f
SHA1 (patch-au) = e5be9a72bc5d0b4014dae0e63c22b60608a8b56c
SHA1 (patch-av) = f12c80d882e0e5e22fe75c53a777cdcd6d3e60be
SHA1 (patch-aw) = 30110bd9bfc53b1c20b32f1eda7e2d4244a9627c
SHA1 (patch-ax) = 565e0f8d6231f064113efdb7931073abdb71abc0
SHA1 (patch-ay) = 44d40f544507c965cb2e53262eb30ed0adbf2c8c
SHA1 (patch-az) = 13b5a91a888c071ac05dfcbb168a12264bb85d26
SHA1 (patch-ba) = fef61bbe4735f14987e8b565daecd95550328c76
SHA1 (patch-bb) = 01316d1ccbd33b3a4c0c2e3c98d1f3d5d4022174
SHA1 (patch-bc) = 936862fd5bc747003f65af42f2194e2850b064f5
SHA1 (patch-bd) = 20fe2401fe134e504660f448851489e063661cc8
SHA1 (patch-be) = e259c828b049a06e0a2729baec9a518615863b69
SHA1 (patch-bf) = 857f94b5f2373bd6d7e0fad322c182394819d654
SHA1 (patch-bg) = b096fe9a643242a26e9f213e2642bc99f5361888
SHA1 (patch-bh) = a3ede3d8c5265d7b95329aa78497b3f70c13c517
SHA1 (patch-bi) = d8e59c50b2893cf54c784881cbafcc646c660501
SHA1 (patch-bj) = 430907594c739b0ed548bf84d6c0c3f134b00f12
SHA1 (patch-bk) = ef3283a97cdd6d7429ca3e36b1daf8836129d5b6
SHA1 (patch-bl) = b484a8e3045fd8ea7442dc54e8eee19461227235
SHA1 (patch-bm) = 5ae49b04315daf26c2c853f26086c1d079599c29
SHA1 (patch-bn) = 24982be2cdf0d70f859187306516e7490ec97a9e
SHA1 (patch-bo) = 024594521de09703eaf75c147af84497983f4917
SHA1 (patch-bp) = 60e79611db9967d5e4c2cd9434ec88867ddd9383
SHA1 (patch-bq) = 099b41d33ff6d7b064610a4557fd06d878ac08c5
SHA1 (patch-br) = 6f468ef729144be9f528d85d1bb4c8b0ba6fd45f
SHA1 (patch-bs) = ee00b9f0e6ca3479c05547408c59d15680ab7ea6
SHA1 (patch-bt) = 47cd4493c6ce07087f06bc9abb6f3de1333ad56d
SHA1 (patch-bu) = 3238d309d728407a179ac174d7f66c27a104f442
SHA1 (patch-bv) = c509c821be24fce6df47a96f18b3ace9ded8246a
SHA1 (patch-bw) = 88ef21fbf274e61a4b1b75b823ff545fd7ed741b
SHA1 (patch-bx) = 8811e5739502c061d79449dc65c27dfe8ef1c03d
SHA1 (patch-by) = 5ed0de9c7d0d519b7d904f9a0e7bb04061d9e77f
SHA1 (patch-bz) = ea60fee95ca6d04f0e4f221a4910efc73796d255
SHA1 (patch-ca) = 6b999fdf1d50db4224c1f14588c0bbf904d00201
SHA1 (patch-cb) = 7ff947303bf03f5efe06e695718fbbabcbdcee7f
SHA1 (patch-cc) = ceeb0982a1246c3b51645e95663e823b2a67b61f
SHA1 (patch-cd) = b425d5a28e4a3a970b9ca69583017bf851f091c5
SHA1 (patch-ce) = 0209d8bcc7066cbcbc3f6fd7155d59a8407a002e
SHA1 (patch-cf) = 52d2f13f465e1884a7e8ce885bc748d2cb9d1132
SHA1 (patch-cg) = 8d14dbb401a6810a140aa57f428b3b80b34d1c3b
SHA1 (patch-ch) = 08dc43f3785ea08df9ced153e48849b683c2aabf
SHA1 (patch-ci) = cb1c37fa20f08ed3d9baa275e2ef31fe122d9b7d
SHA1 (patch-cj) = ba5783189ddd37d6a5a25c588e65550bc7ffe5e7
SHA1 (patch-ck) = 8ac32470e091dc95b3d2e78ba35658dffa54f057
SHA1 (patch-cl) = 10065e0f5b61441d60e8354fb03dbc910dfe02fd
SHA1 (patch-cm) = 186726168753fa23de3220421d2ddf91b08c4884
SHA1 (patch-cn) = 355ea10eaa1eb590fc64cd535595f171af2be271
SHA1 (patch-co) = 32f5d4b2ae185518ca4768fb03785c3e7782196f
SHA1 (patch-cp) = d0367e27fa22a63cfc573a4fb4a801b688b213c1
SHA1 (gcc-2.95.3-diff-2002-08-11.gz) = 0d587df7cf552f1ae92131e6e0e5b37d543f2b05
Size (gcc-2.95.3-diff-2002-08-11.gz) = 80435 bytes
SHA1 (patch-aa) = 1f6daca7e6abe4c29987f1360d2c77e4c344b6d1

35
lang/gcc/files/UPDATE.txt Normal file
View file

@ -0,0 +1,35 @@
# $NetBSD: UPDATE.txt,v 1.1 2002/08/12 01:53:37 dmcmahill Exp $
This file documents the steps taken to update this package.
=) Extract sources
make clean && make extract
=) Copy to .orig directory
mkdir -p /some/tmp/dir/gcc-2.95.3.orig
mv work/gcc-2.95.3 /some/tmp/dir/gcc-2.95.3.orig/gcc
=) Update in-tree gcc sources
cd /usr/src/gnu/dist/toolchain && cvs update
=) Copy over the new sources excluding CVS directories
mkdir /some/tmp/dir/gcc-2.95.3
tar --exclude CVS -cvf - gcc | ( cd /some/tmp/dir/gcc-2.95.3 ; tar -xf - )
=) Create patch file
mkdir /some/tmp/dir/foo
cd /some/tmp/dir/foo && diff -u2 -r -N ../gcc-2.95.3.orig/gcc ../gcc-2.95.3/gcc > gcc-2.95.3-diff-`date '+%Y-%m-%d'`
gzip gcc-2.95.3-diff-`date '+%Y-%m-%d'`
=) copy the patch file to your distfiles directory, and 'make makesum'. Now proceed with
creating any pkgsrc specific patches for gcc, placing them in patches/ as usual.
=) when its all tested and working, upload the patchfile
to ftp.netbsd.org:/pub/NetBSD/packages/distfiles/LOCAL_PORTS/
Hopefully this procedure will make maintaining this package a little easier.

View file

@ -1,12 +0,0 @@
$NetBSD: patch-aa,v 1.3 2002/03/28 10:11:52 jmc Exp $
--- ../gcc-2.95.3/gcc/f/g77.1.orig 2000/07/26 00:17:58 1.1.1.1
+++ ../gcc-2.95.3/gcc/f/g77.1 2001/01/31 15:26:42 1.2
@@ -8,6 +8,7 @@
\(**
..
.SH NAME
+f77, fort77,
g77 \- GNU project Fortran Compiler (v0.5.24)
.SH SYNOPSIS
.RB g77 " [" \c

View file

@ -1,14 +0,0 @@
$NetBSD: patch-ab,v 1.4 2002/03/28 10:11:52 jmc Exp $
--- ../gcc-2.95.3/gcc/f/proj.h.orig 2000/07/26 00:18:01 1.1.1.1
+++ ../gcc-2.95.3/gcc/f/proj.h 2002/03/27 04:09:03 1.3
@@ -66,7 +66,9 @@
Doggone_Trailing_Comma_Dont_Work = 1
} bool;
+#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
+#endif
#ifndef UNUSED /* Compile with -DUNUSED= if cc doesn't support this. */
#if BUILT_WITH_270

View file

@ -1,23 +0,0 @@
$NetBSD: patch-ac,v 1.3 2002/03/28 10:11:52 jmc Exp $
--- ../gcc-2.95.3/gcc/config/alpha/alpha.c.orig 2000/07/26 00:18:10 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/alpha/alpha.c 2001/06/18 16:10:27 1.2
@@ -275,7 +275,7 @@
static int const cache_latency[][4] =
{
{ 3, 30, -1 }, /* ev4 -- Bcache is a guess */
- { 2, 12, 38 }, /* ev5 -- Bcache from PC164 LMbench numbers */
+ { 3, 12, 38 }, /* ev5 -- Bcache from PC164 LMbench numbers */
{ 3, 13, -1 }, /* ev6 -- Ho hum, doesn't exist yet */
};
@@ -3375,7 +3375,8 @@
/* Write a version stamp. Don't write anything if we are running as a
cross-compiler. Otherwise, use the versions in /usr/include/stamp.h. */
-#ifdef HAVE_STAMP_H
+#if !defined(CROSS_COMPILE) && !defined(_WIN32) && !defined(__linux__) && \
+ !defined(VMS) && !defined(__NetBSD__)
#include <stamp.h>
#endif

View file

@ -1,31 +0,0 @@
$NetBSD: patch-ad,v 1.4 2002/03/28 10:11:52 jmc Exp $
--- ../gcc-2.95.3/gcc/config/alpha/alpha.h.orig 2000/07/26 00:18:11 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/alpha/alpha.h 2001/06/18 16:10:28 1.2
@@ -49,9 +49,6 @@
|| !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
|| !strcmp (STR, "isystem"))
-/* Print subsidiary information on the compiler version in use. */
-#define TARGET_VERSION
-
/* Run-time compilation parameters selecting different hardware subsets. */
/* Which processor to schedule for. The cpu attribute defines a list that
@@ -493,14 +490,14 @@
a bug in DEC's assembler. */
#define LOOP_ALIGN(LABEL) \
- (optimize > 0 && write_symbols != SDB_DEBUG ? 4 : 0)
+ (!optimize_size && optimize > 0 && write_symbols != SDB_DEBUG ? 4 : 0)
/* This is how to align an instruction for optimal branching. On
Alpha we'll get better performance by aligning on an octaword
boundary. */
#define LABEL_ALIGN_AFTER_BARRIER(FILE) \
- (optimize > 0 && write_symbols != SDB_DEBUG ? 4 : 0)
+ (!optimize_size && optimize > 0 && write_symbols != SDB_DEBUG ? 4 : 0)
/* No data type wants to be aligned rounder than this. */
#define BIGGEST_ALIGNMENT 64

View file

@ -1,555 +0,0 @@
$NetBSD: patch-ae,v 1.5 2002/03/31 08:05:52 jmc Exp $
--- ../gcc-2.95.3/gcc/config/alpha/netbsd.h.orig 2000/07/26 00:18:12 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/alpha/netbsd.h 2002/01/22 02:09:39 1.8
@@ -19,17 +19,84 @@
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* This is used on Alpha platforms that use the ELF format.
+ This was taken from the Linux configuration, and modified
+ for NetBSD/alpha by Jason R. Thorpe <thorpej@netbsd.org> */
+
+/* Get generic Alpha definitions. */
+
+#include <alpha/alpha.h>
+
+/* Get generic NetBSD ELF definitions. We will override these if necessary. */
+
+#define NETBSD_ELF
+#include <netbsd.h>
+
+#undef OBJECT_FORMAT_COFF
+#undef EXTENDED_COFF
+#define OBJECT_FORMAT_ELF
+
+/* This is BSD, so it wants DBX format. */
+
+#define DBX_DEBUGGING_INFO
+
+/* This is the char to use for continuation (in case we need to turn
+ continuation back on). */
+
+#define DBX_CONTIN_CHAR '?'
+
+#undef ASM_FINAL_SPEC
+
+#undef CC1_SPEC
+#define CC1_SPEC "%{G*}"
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{G*} %{relax:-relax} %{gdwarf*:-no-mdebug}"
+
+/* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target. Only
+ the linker emulation and -O options are Alpha-specific. The rest are
+ common to all ELF targets, except for the name of the start function. */
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "-m elf64alpha \
+ -e __start \
+ %{O*:-O3} %{!O*:-O1} \
+ %{assert*} %{R*} \
+ %{shared:-shared} \
+ %{!shared: \
+ -dc -dp \
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
+ %{static:-static}}"
+
+/* Names to predefine in the preprocessor for this target machine.
+ XXX NetBSD, by convention, shouldn't do __alpha, but lots of applications
+ expect it because that's what OSF/1 does. */
+
+/* NetBSD Extension to GNU C: __KPRINTF_ATTRIBUTE__ */
+
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D_LONGLONG -Dnetbsd -Dunix " SUB_CPP_PREDEFINES
+#define CPP_PREDEFINES "\
+-D__alpha__ -D__alpha -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ \
+-Asystem(unix) -Asystem(NetBSD) -Acpu(alpha) -Amachine(alpha)"
+
+/* Make gcc agree with <machine/ansi.h> */
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
-#undef LIB_SPEC
-#define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
-/* Generate calls to memcpy, etc., not bcopy, etc. */
-#define TARGET_MEM_FUNCTIONS
+/* Output assembler code to FILE to increment profiler label # LABELNO
+ for profiling a function entry. Under NetBSD/Alpha, the assembler does
+ nothing special with -pg. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
@@ -37,3 +104,460 @@
/* Show that we need a GP when profiling. */
#define TARGET_PROFILING_NEEDS_GP
+
+#define bsd4_4
+#undef HAS_INIT_SECTION
+
+#undef DEFAULT_VTABLE_THUNKS
+#define DEFAULT_VTABLE_THUNKS 1
+
+/* Output at beginning of assembler file. */
+
+#undef ASM_FILE_START
+#define ASM_FILE_START(FILE) \
+do { \
+ if (write_symbols != DWARF2_DEBUG) \
+ { \
+ alpha_write_verstamp (FILE); \
+ output_file_directive (FILE, main_input_filename); \
+ } \
+ fprintf (FILE, "\t.set noat\n"); \
+ fprintf (FILE, "\t.set noreorder\n"); \
+ if (TARGET_BWX | TARGET_MAX | TARGET_FIX | TARGET_CIX) \
+ { \
+ fprintf (FILE, "\t.arch %s\n", \
+ (alpha_cpu == PROCESSOR_EV6 ? "ev6" \
+ : TARGET_MAX ? "pca56" : "ev56")); \
+ } \
+} while (0)
+
+#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) \
+ alpha_output_lineno (STREAM, LINE)
+extern void alpha_output_lineno ();
+
+extern void output_file_directive ();
+
+/* Attach a special .ident directive to the end of the file to identify
+ the version of GCC which compiled this code. The format of the
+ .ident string is patterned after the ones produced by native svr4
+ C compilers. */
+
+#define IDENT_ASM_OP ".ident"
+
+#ifdef IDENTIFY_WITH_IDENT
+#define ASM_IDENTIFY_GCC(FILE) /* nothing */
+#define ASM_IDENTIFY_LANGUAGE(FILE) \
+ fprintf(FILE, "\t%s \"GCC (%s) %s\"\n", IDENT_ASM_OP, \
+ lang_identify(), version_string)
+#else
+#define ASM_FILE_END(FILE) \
+do { \
+ if (!flag_no_ident) \
+ fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \
+ IDENT_ASM_OP, version_string); \
+ } while (0)
+#endif
+
+/* Allow #sccs in preprocessor. */
+
+#define SCCS_DIRECTIVE
+
+/* Output #ident as a .ident. */
+
+#define ASM_OUTPUT_IDENT(FILE, NAME) \
+ fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
+
+/* This is how to allocate empty space in some section. The .zero
+ pseudo-op is used for this on most svr4 assemblers. */
+
+#define SKIP_ASM_OP ".zero"
+
+#undef ASM_OUTPUT_SKIP
+#define ASM_OUTPUT_SKIP(FILE,SIZE) \
+ fprintf (FILE, "\t%s\t%u\n", SKIP_ASM_OP, (SIZE))
+
+/* Output the label which precedes a jumptable. Note that for all svr4
+ systems where we actually generate jumptables (which is to say every
+ svr4 target except i386, where we use casesi instead) we put the jump-
+ tables into the .rodata section and since other stuff could have been
+ put into the .rodata section prior to any given jumptable, we have to
+ make sure that the location counter for the .rodata section gets pro-
+ perly re-aligned prior to the actual beginning of the jump table. */
+
+#define ALIGN_ASM_OP ".align"
+
+#ifndef ASM_OUTPUT_BEFORE_CASE_LABEL
+#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
+ ASM_OUTPUT_ALIGN ((FILE), 2);
+#endif
+
+#undef ASM_OUTPUT_CASE_LABEL
+#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE) \
+ do { \
+ ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE) \
+ ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); \
+ } while (0)
+
+/* The standard SVR4 assembler seems to require that certain builtin
+ library routines (e.g. .udiv) be explicitly declared as .globl
+ in each assembly file where they are referenced. */
+
+#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
+ ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0))
+
+/* This says how to output assembler code to declare an
+ uninitialized external linkage data object. Under SVR4,
+ the linker seems to want the alignment of data objects
+ to depend on their types. We do exactly that here. */
+
+#define COMMON_ASM_OP ".comm"
+
+#undef ASM_OUTPUT_ALIGNED_COMMON
+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
+do { \
+ fprintf ((FILE), "\t%s\t", COMMON_ASM_OP); \
+ assemble_name ((FILE), (NAME)); \
+ fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
+} while (0)
+
+/* This says how to output assembler code to declare an
+ uninitialized internal linkage data object. Under SVR4,
+ the linker seems to want the alignment of data objects
+ to depend on their types. We do exactly that here. */
+
+#undef ASM_OUTPUT_ALIGNED_LOCAL
+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
+do { \
+ if ((SIZE) <= g_switch_value) \
+ sbss_section(); \
+ else \
+ bss_section(); \
+ fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ putc (',', FILE); \
+ fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
+ putc ('\n', FILE); \
+ if (!flag_inhibit_size_directive) \
+ { \
+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, ",%d\n", (SIZE)); \
+ } \
+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
+ ASM_OUTPUT_LABEL(FILE, NAME); \
+ ASM_OUTPUT_SKIP((FILE), (SIZE)); \
+} while (0)
+
+/* This is the pseudo-op used to generate a 64-bit word of data with a
+ specific value in some section. */
+
+#define INT_ASM_OP ".quad"
+
+/* Biggest alignment supported by the object file format of this
+ machine. Use this macro to limit the alignment which can be
+ specified using the `__attribute__ ((aligned (N)))' construct. If
+ not defined, the default value is `BIGGEST_ALIGNMENT'.
+
+ This value is really 2^63. Since gcc figures the alignment in bits,
+ we could only potentially get to 2^60 on suitible hosts. Due to other
+ considerations in varasm, we must restrict this to what fits in an int. */
+
+#define MAX_OFILE_ALIGNMENT \
+ (1 << (HOST_BITS_PER_INT < 64 ? HOST_BITS_PER_INT - 2 : 62))
+
+/* This is the pseudo-op used to generate a contiguous sequence of byte
+ values from a double-quoted string WITHOUT HAVING A TERMINATING NUL
+ AUTOMATICALLY APPENDED. This is the same for most svr4 assemblers. */
+
+#undef ASCII_DATA_ASM_OP
+#define ASCII_DATA_ASM_OP ".ascii"
+
+/* Support const sections and the ctors and dtors sections for g++.
+ Note that there appears to be two different ways to support const
+ sections at the moment. You can either #define the symbol
+ READONLY_DATA_SECTION (giving it some code which switches to the
+ readonly data section) or else you can #define the symbols
+ EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and
+ SELECT_RTX_SECTION. We do both here just to be on the safe side. */
+
+#define USE_CONST_SECTION 1
+
+#define CONST_SECTION_ASM_OP ".section\t.rodata"
+
+/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
+
+ Note that we want to give these sections the SHF_WRITE attribute
+ because these sections will actually contain data (i.e. tables of
+ addresses of functions in the current root executable or shared library
+ file) and, in the case of a shared library, the relocatable addresses
+ will have to be properly resolved/relocated (and then written into) by
+ the dynamic linker when it actually attaches the given shared library
+ to the executing process. (Note that on SVR4, you may wish to use the
+ `-z text' option to the ELF linker, when building a shared library, as
+ an additional check that you are doing everything right. But if you do
+ use the `-z text' option when building a shared library, you will get
+ errors unless the .ctors and .dtors sections are marked as writable
+ via the SHF_WRITE attribute.) */
+
+#define CTORS_SECTION_ASM_OP ".section\t.ctors,\"aw\""
+#define DTORS_SECTION_ASM_OP ".section\t.dtors,\"aw\""
+
+/* Handle the small data sections. */
+#define BSS_SECTION_ASM_OP ".section\t.bss"
+#define SBSS_SECTION_ASM_OP ".section\t.sbss,\"aw\""
+#define SDATA_SECTION_ASM_OP ".section\t.sdata,\"aw\""
+
+/* On svr4, we *do* have support for the .init and .fini sections, and we
+ can put stuff in there to be executed before and after `main'. We let
+ crtstuff.c and other files know this by defining the following symbols.
+ The definitions say how to change sections to the .init and .fini
+ sections. This is the same for all known svr4 assemblers. */
+
+#define INIT_SECTION_ASM_OP ".section\t.init"
+#define FINI_SECTION_ASM_OP ".section\t.fini"
+
+/* A default list of other sections which we might be "in" at any given
+ time. For targets that use additional sections (e.g. .tdesc) you
+ should override this definition in the target-specific file which
+ includes this file. */
+
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_sbss, in_sdata
+
+/* A default list of extra section function definitions. For targets
+ that use additional sections (e.g. .tdesc) you should override this
+ definition in the target-specific file which includes this file. */
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS \
+ CONST_SECTION_FUNCTION \
+ SECTION_FUNCTION_TEMPLATE(ctors_section, in_ctors, CTORS_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(dtors_section, in_dtors, DTORS_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP)
+
+#undef READONLY_DATA_SECTION
+#define READONLY_DATA_SECTION() const_section ()
+
+extern void text_section ();
+
+#define CONST_SECTION_FUNCTION \
+void \
+const_section () \
+{ \
+ if (!USE_CONST_SECTION) \
+ text_section(); \
+ else if (in_section != in_const) \
+ { \
+ fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \
+ in_section = in_const; \
+ } \
+}
+
+#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \
+void FN () \
+{ \
+ if (in_section != ENUM) \
+ { \
+ fprintf (asm_out_file, "%s\n", OP); \
+ in_section = ENUM; \
+ } \
+}
+
+
+/* Switch into a generic section.
+ This is currently only used to support section attributes.
+
+ We make the section read-only and executable for a function decl,
+ read-only for a const data decl, and writable for a non-const data decl. */
+#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
+ fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", NAME, \
+ (DECL) && TREE_CODE (DECL) == FUNCTION_DECL ? "ax" : \
+ (DECL) && DECL_READONLY_SECTION (DECL, RELOC) ? "a" : "aw")
+
+
+/* A C statement (sans semicolon) to output an element in the table of
+ global constructors. */
+#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
+ do { \
+ ctors_section (); \
+ fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
+/* A C statement (sans semicolon) to output an element in the table of
+ global destructors. */
+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
+ do { \
+ dtors_section (); \
+ fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
+/* A C statement or statements to switch to the appropriate
+ section for output of DECL. DECL is either a `VAR_DECL' node
+ or a constant of some sort. RELOC indicates whether forming
+ the initial value of DECL requires link-time relocations. */
+
+#define SELECT_SECTION(DECL,RELOC) \
+{ \
+ if (TREE_CODE (DECL) == STRING_CST) \
+ { \
+ if (! flag_writable_strings) \
+ const_section (); \
+ else \
+ data_section (); \
+ } \
+ else if (TREE_CODE (DECL) == VAR_DECL) \
+ { \
+ if ((flag_pic && RELOC) \
+ || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \
+ || !DECL_INITIAL (DECL) \
+ || (DECL_INITIAL (DECL) != error_mark_node \
+ && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \
+ { \
+ int size = int_size_in_bytes (TREE_TYPE (DECL)); \
+ if (size >= 0 && size <= g_switch_value) \
+ sdata_section (); \
+ else \
+ data_section (); \
+ } \
+ else \
+ const_section (); \
+ } \
+ else \
+ const_section (); \
+}
+
+/* A C statement or statements to switch to the appropriate
+ section for output of RTX in mode MODE. RTX is some kind
+ of constant in RTL. The argument MODE is redundant except
+ in the case of a `const_int' rtx. Currently, these always
+ go into the const section. */
+
+#undef SELECT_RTX_SECTION
+#define SELECT_RTX_SECTION(MODE,RTX) const_section()
+
+/* Define the strings used for the special svr4 .type and .size directives.
+ These strings generally do not vary from one system running svr4 to
+ another, but if a given system (e.g. m88k running svr) needs to use
+ different pseudo-op names for these, they may be overridden in the
+ file which includes this one. */
+
+#undef TYPE_ASM_OP
+#undef SIZE_ASM_OP
+#undef SET_ASM_OP /* no equivalent */
+#define TYPE_ASM_OP ".type"
+#define SIZE_ASM_OP ".size"
+
+/* This is how we tell the assembler that two symbols have the same value. */
+
+#define ASM_OUTPUT_DEF(FILE,NAME1,NAME2) \
+ do { assemble_name(FILE, NAME1); \
+ fputs(" = ", FILE); \
+ assemble_name(FILE, NAME2); \
+ fputc('\n', FILE); } while (0)
+
+/* These macros generate the special .type and .size directives which
+ are used to set the corresponding fields of the linker symbol table
+ entries in an ELF object file under SVR4. These macros also output
+ the starting labels for the relevant functions/objects. */
+
+/* Write the extra assembler code needed to declare an object properly. */
+
+#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
+ do { \
+ fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ putc (',', FILE); \
+ fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
+ putc ('\n', FILE); \
+ size_directive_output = 0; \
+ if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
+ { \
+ size_directive_output = 1; \
+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
+ } \
+ ASM_OUTPUT_LABEL(FILE, NAME); \
+ } while (0)
+
+/* Output the size directive for a decl in rest_of_decl_compilation
+ in the case where we did not do so before the initializer.
+ Once we find the error_mark_node, we know that the value of
+ size_directive_output was set
+ by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
+
+#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
+do { \
+ char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
+ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
+ && ! AT_END && TOP_LEVEL \
+ && DECL_INITIAL (DECL) == error_mark_node \
+ && !size_directive_output) \
+ { \
+ size_directive_output = 1; \
+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
+ assemble_name (FILE, name); \
+ putc (',', FILE); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \
+ int_size_in_bytes (TREE_TYPE (DECL))); \
+ putc ('\n', FILE); \
+ } \
+} while (0)
+
+/* A table of bytes codes used by the ASM_OUTPUT_ASCII and
+ ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table
+ corresponds to a particular byte value [0..255]. For any
+ given byte value, if the value in the corresponding table
+ position is zero, the given character can be output directly.
+ If the table value is 1, the byte must be output as a \ooo
+ octal escape. If the tables value is anything else, then the
+ byte value should be output as a \ followed by the value
+ in the table. Note that we can use standard UN*X escape
+ sequences for many control characters, but we don't use
+ \a to represent BEL because some svr4 assemblers (e.g. on
+ the i386) don't know about that. Also, we don't use \v
+ since some versions of gas, such as 2.2 did not accept it. */
+
+#define ESCAPES \
+"\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
+\0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\
+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\
+\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
+\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
+\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
+\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"
+
+/* Some svr4 assemblers have a limit on the number of characters which
+ can appear in the operand of a .string directive. If your assembler
+ has such a limitation, you should define STRING_LIMIT to reflect that
+ limit. Note that at least some svr4 assemblers have a limit on the
+ actual number of bytes in the double-quoted string, and that they
+ count each character in an escape sequence as one byte. Thus, an
+ escape sequence like \377 would count as four bytes.
+
+ If your target assembler doesn't support the .string directive, you
+ should define this to zero.
+*/
+
+#define STRING_LIMIT ((unsigned) 256)
+
+#define STRING_ASM_OP ".string"
+
+/* GAS is the only Alpha/ELF assembler. */
+#undef TARGET_GAS
+#define TARGET_GAS (1)
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+/* Undo the auto-alignment stuff from alpha.h. ELF has unaligned data
+ pseudos natively. */
+#undef UNALIGNED_SHORT_ASM_OP
+#undef UNALIGNED_INT_ASM_OP
+#undef UNALIGNED_DOUBLE_INT_ASM_OP

View file

@ -1,114 +0,0 @@
$NetBSD: patch-af,v 1.4 2002/03/28 10:11:52 jmc Exp $
--- ../gcc-2.95.3/gcc/config/arm/arm.c.orig 2001/04/23 11:59:30 1.1.1.2
+++ ../gcc-2.95.3/gcc/config/arm/arm.c 2001/12/19 23:14:50 1.4
@@ -281,7 +281,7 @@
if (ptr->string != NULL && ptr->string[0] != '\0')
{
- struct processors * sel;
+ const struct processors * sel;
for (sel = ptr->processors; sel->name != NULL; sel ++)
if (streq (ptr->string, sel->name))
@@ -566,7 +566,7 @@
if (!reload_completed
|| current_function_pretend_args_size
|| current_function_anonymous_args
- || ((get_frame_size () + current_function_outgoing_args_size != 0)
+ || ((arm_get_frame_size () + current_function_outgoing_args_size != 0)
&& !(TARGET_APCS && frame_pointer_needed)))
return 0;
@@ -5397,6 +5397,18 @@
return "";
}
+/* Generate a sequence of insns that will generate the correct return
+ address mask depending on the physical architecture that the program
+ is running on. */
+rtx
+arm_gen_return_addr_mask ()
+{
+ rtx reg = gen_reg_rtx (Pmode);
+
+ emit_insn (gen_return_addr_mask (reg));
+ return reg;
+}
+
/* Return nonzero if optimizing and the current function is volatile.
Such functions never return, and many memory cycles can be saved
by not storing register values that will never be needed again.
@@ -5828,11 +5840,71 @@
emit_insn (par);
}
+/* Calculate the size of the stack frame, taking into account any
+ padding that is required to ensure stack-alignment. */
+int arm_get_frame_size ()
+{
+ int regno;
+
+ int base_size = (get_frame_size () + 3) & ~3;
+ int entry_size = 0;
+ int live_regs_mask = 0;
+ int volatile_func = (optimize > 0
+ && TREE_THIS_VOLATILE (current_function_decl));
+
+ if (! TARGET_ATPCS_STACK_ALIGN)
+ return base_size;
+
+ /* We know that SP will be word aligned on entry, and we must
+ preserve that condition at any subroutine call. But those are
+ the only constraints. */
+
+ /* Space for variadic functions. */
+ if (current_function_pretend_args_size)
+ entry_size += current_function_pretend_args_size;
+
+ if (! volatile_func)
+ {
+ for (regno = 0; regno <= 10; regno++)
+ if (regs_ever_live[regno] && ! call_used_regs[regno])
+ live_regs_mask |= 1 << regno;
+
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ live_regs_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
+
+ if (regs_ever_live[14])
+ live_regs_mask |= 0x4000;
+ }
+
+ if (frame_pointer_needed)
+ live_regs_mask |= 0xD800;
+
+ /* If we have to push any registers, we must also push lr as well. */
+ if (live_regs_mask)
+ live_regs_mask |= 0x4000;
+
+ for (regno = 0; regno < 16; regno++)
+ if (live_regs_mask & (1 << regno))
+ entry_size += 4;
+
+ if (! volatile_func)
+ {
+ for (regno = 23; regno > 15; regno--)
+ if (regs_ever_live[regno] && ! call_used_regs[regno])
+ entry_size += 12;
+ }
+
+ if ((entry_size + base_size + current_function_outgoing_args_size) & 7)
+ base_size += 4;
+
+ return base_size;
+}
+
void
arm_expand_prologue ()
{
int reg;
- rtx amount = GEN_INT (-(get_frame_size ()
+ rtx amount = GEN_INT (-(arm_get_frame_size ()
+ current_function_outgoing_args_size));
int live_regs_mask = 0;
int store_arg_regs = 0;

View file

@ -1,106 +0,0 @@
$NetBSD: patch-ag,v 1.3 2002/03/28 10:11:52 jmc Exp $
--- ../gcc-2.95.3/gcc/config/arm/arm.h.orig 2001/04/23 11:59:31 1.1.1.2
+++ ../gcc-2.95.3/gcc/config/arm/arm.h 2001/12/19 23:14:50 1.4
@@ -199,7 +199,9 @@
"
/* Default is hard float, which doesn't define anything */
+#ifndef CPP_FLOAT_DEFAULT_SPEC
#define CPP_FLOAT_DEFAULT_SPEC ""
+#endif
#define CPP_ENDIAN_SPEC "\
%{mbig-endian: \
@@ -210,7 +212,9 @@
"
/* Default is little endian, which doesn't define anything. */
+#ifndef CPP_ENDIAN_DEFAULT_SPEC
#define CPP_ENDIAN_DEFAULT_SPEC ""
+#endif
#define CC1_SPEC ""
@@ -310,6 +314,10 @@
function tries to return. */
#define ARM_FLAG_ABORT_NORETURN (0x8000)
+/* Nonzero if the stack should be 64-bit aligned at function boundaries,
+ as mandated by the ATPCS. */
+#define ARM_FLAG_ATPCS_STACK_ALIGN (0x10000)
+
#define TARGET_APCS (target_flags & ARM_FLAG_APCS_FRAME)
#define TARGET_POKE_FUNCTION_NAME (target_flags & ARM_FLAG_POKE)
#define TARGET_FPE (target_flags & ARM_FLAG_FPE)
@@ -332,6 +340,7 @@
#define TARGET_LITTLE_WORDS (target_flags & ARM_FLAG_LITTLE_WORDS)
#define TARGET_NO_SCHED_PRO (target_flags & ARM_FLAG_NO_SCHED_PRO)
#define TARGET_ABORT_NORETURN (target_flags & ARM_FLAG_ABORT_NORETURN)
+#define TARGET_ATPCS_STACK_ALIGN (target_flags & ARM_FLAG_ATPCS_STACK_ALIGN)
/* SUBTARGET_SWITCHES is used to add flags on a per-config basis.
Bit 31 is reserved. See riscix.h. */
@@ -590,6 +599,8 @@
#define STACK_BOUNDARY 32
+#define PREFERRED_STACK_BOUNDARY (TARGET_ATPCS_STACK_ALIGN ? 64 : 32)
+
#define FUNCTION_BOUNDARY 32
#define EMPTY_FIELD_BOUNDARY 32
@@ -1252,7 +1263,7 @@
else if ((FROM) == FRAME_POINTER_REGNUM \
&& (TO) == STACK_POINTER_REGNUM) \
(OFFSET) = (current_function_outgoing_args_size \
- + ((get_frame_size () + 3) & ~3)); \
+ + arm_get_frame_size ()); \
else \
{ \
int regno; \
@@ -1281,7 +1292,7 @@
&& (regs_ever_live[14] || saved_hard_reg)) \
offset += 4; \
offset += current_function_outgoing_args_size; \
- (OFFSET) = ((get_frame_size () + 3) & ~3) + offset; \
+ (OFFSET) = arm_get_frame_size () + offset; \
} \
} \
}
@@ -2113,12 +2124,16 @@
/* Used to mask out junk bits from the return address, such as
processor state, interrupt status, condition codes and the like. */
-#define MASK_RETURN_ADDR \
+#define MASK_RETURN_ADDR \
/* If we are generating code for an ARM2/ARM3 machine or for an ARM6 \
in 26 bit mode, the condition codes must be masked out of the \
return address. This does not apply to ARM6 and later processors \
- when running in 32 bit mode. */ \
- ((!TARGET_APCS_32) ? (GEN_INT (0x03fffffc)) : (GEN_INT (0xffffffff)))
+ when running in 32 bit mode, but if we are not targeting archv4 \
+ or later, assume this may be ARM2/3 running in 32-bit compatible \
+ code mode. */ \
+ ((!TARGET_APCS_32) ? (GEN_INT (0x03fffffc)) \
+ : arm_arch4 ? (GEN_INT (0xffffffff)) \
+ : arm_gen_return_addr_mask ())
/* The remainder of this file is only needed for building the compiler
itself, not for the collateral. */
@@ -2217,6 +2232,7 @@
Rtx gen_rotated_half_load PROTO ((Rtx));
Mmode arm_select_cc_mode RTX_CODE_PROTO ((Rcode, Rtx, Rtx));
Rtx gen_compare_reg RTX_CODE_PROTO ((Rcode, Rtx, Rtx, int));
+Rtx arm_gen_return_addr_mask PROTO ((void));
void arm_reload_in_hi PROTO ((Rtx *));
void arm_reload_out_hi PROTO ((Rtx *));
void arm_reorg PROTO ((Rtx));
@@ -2239,6 +2255,7 @@
void arm_poke_function_name STDIO_PROTO ((FILE *, char *));
void output_func_prologue STDIO_PROTO ((FILE *, int));
void output_func_epilogue STDIO_PROTO ((FILE *, int));
+int arm_get_frame_size PROTO ((void));
void arm_expand_prologue PROTO ((void));
void arm_print_operand STDIO_PROTO ((FILE *, Rtx, int));
void arm_final_prescan_insn PROTO ((Rtx));

View file

@ -1,46 +0,0 @@
$NetBSD: patch-ah,v 1.3 2002/03/28 10:11:52 jmc Exp $
--- ../gcc-2.95.3/gcc/config/arm/arm.md.orig 2001/04/23 11:59:31 1.1.1.2
+++ ../gcc-2.95.3/gcc/config/arm/arm.md 2001/11/08 20:47:56 1.3
@@ -1682,9 +1682,9 @@
(match_operand:SI 3 "arm_rhs_operand" "rI,rI")])
(match_operand:SI 1 "s_register_operand" "0,?r")]))
(clobber (reg:CC 24))]
- "GET_CODE (operands[1]) != REG
+ "0 && (GET_CODE (operands[1]) != REG
|| (REGNO(operands[1]) != FRAME_POINTER_REGNUM
- && REGNO(operands[1]) != ARG_POINTER_REGNUM)"
+ && REGNO(operands[1]) != ARG_POINTER_REGNUM))"
"*
{
enum rtx_code code = GET_CODE (operands[4]);
@@ -4322,6 +4322,29 @@
}"
[(set_attr "conds" "use")
(set_attr "type" "load")])
+
+(define_expand "return_addr_mask"
+ [(set (match_dup 1)
+ (compare:CC_NOOV (unspec [(const_int 0)] 4)
+ (const_int 0)))
+ (set (match_operand:SI 0 "s_register_operand" "")
+ (if_then_else:SI (eq (match_dup 1) (const_int 0))
+ (const_int -1)
+ (const_int 67108860)))] ; 0x03fffffc
+ ""
+ "
+ operands[1] = gen_rtx_REG (CC_NOOVmode, 24);
+ ")
+
+(define_insn "*check_arch2"
+ [(set (match_operand:CC_NOOV 0 "cc_register" "")
+ (compare:CC_NOOV (unspec [(const_int 0)] 4)
+ (const_int 0)))]
+ ""
+ "teq\\t%|r0, %|r0\;teq\\t%|pc, %|pc"
+ [(set_attr "length" "8")
+ (set_attr "conds" "set")]
+)
;; Call subroutine returning any type.

View file

@ -1,72 +0,0 @@
$NetBSD: patch-ai,v 1.3 2002/03/28 10:11:52 jmc Exp $
--- ../gcc-2.95.3/gcc/config/arm/elf.h.orig 2000/07/26 00:18:16 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/arm/elf.h 2001/05/03 18:20:47 1.2
@@ -163,6 +163,15 @@
#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32)
#endif
+/* Set CPP macros to reflect TARGET_DEFAULT */
+#ifndef CPP_FLOAT_DEFAULT_SPEC
+#define CPP_FLOAT_DEFAULT_SPEC "-D__SOFTFP__"
+#endif
+
+#ifndef CPP_APCS_PC_DEFAULT_SPEC
+#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+#endif
+
#ifndef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
#endif
@@ -350,5 +359,51 @@
/* Align output to a power of two. */
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
fprintf (STREAM, "\t.align\t%d\n", POWER)
+
+/* following ripped from elfos.h */
+/* Switch into a generic section.
+ This is currently only used to support section attributes. */
+
+#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
+do { \
+ static struct section_info \
+ { \
+ struct section_info *next; \
+ char *name; \
+ enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \
+ } *sections; \
+ struct section_info *s; \
+ char *mode; \
+ enum sect_enum type; \
+ \
+ for (s = sections; s; s = s->next) \
+ if (!strcmp (NAME, s->name)) \
+ break; \
+ \
+ if (DECL && TREE_CODE (DECL) == FUNCTION_DECL) \
+ type = SECT_EXEC, mode = "ax"; \
+ else if (DECL && DECL_READONLY_SECTION (DECL, RELOC)) \
+ type = SECT_RO, mode = "a"; \
+ else \
+ type = SECT_RW, mode = "aw"; \
+ \
+ if (s == 0) \
+ { \
+ s = (struct section_info *) xmalloc (sizeof (struct section_info)); \
+ s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME)); \
+ strcpy (s->name, NAME); \
+ s->type = type; \
+ s->next = sections; \
+ sections = s; \
+ fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", NAME, mode); \
+ } \
+ else \
+ { \
+ if (DECL && s->type != type) \
+ error_with_decl (DECL, "%s causes a section type conflict"); \
+ \
+ fprintf (FILE, ".section\t%s\n", NAME); \
+ } \
+} while (0)
#include "arm/aout.h"

View file

@ -1,86 +0,0 @@
$NetBSD: patch-aj,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/arm/netbsd.h.orig 2000/07/26 00:18:16 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/arm/netbsd.h 2001/06/18 16:09:21 1.2
@@ -1,4 +1,4 @@
-/* NetBSD/arm (RiscBSD) version.
+/* NetBSD/arm32 version.
Copyright (C) 1993, 1994, 1997, 1998 Free Software Foundation, Inc.
Contributed by Mark Brinicombe (amb@physig.ph.kcl.ac.uk)
@@ -46,24 +46,28 @@
#include <netbsd.h>
+/* NetBSD uses gas so we want to use .ident */
+#undef ASM_OUTPUT_IDENT
+#define ASM_OUTPUT_IDENT(STREAM,STRING) \
+ fprintf (STREAM,"\t.ident \"%s\"\n",STRING)
+
+/* On the ARM `@' introduces a comment, so we must use something else
+ for .type directives. Most NetBSD platforms use %, but we use #
+ because of some legacy assemblers. */
+#undef TYPE_OPERAND_FMT
+#define TYPE_OPERAND_FMT "#%s"
+
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#undef DWARF2_UNWIND_INFO
-/* Some defines for CPP.
- arm32 is the NetBSD port name, so we always define arm32 and __arm32__. */
+/* Some defines for CPP. arm32 is the NetBSD port name, so we always (only)
+ define __arm32__ and __NetBSD__, and add __KPRINTF_ATTRIBUTE__ since
+ this compiler is hacked with the NetBSD kprintf attribute mods. */
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "\
--Dunix -Driscbsd -Darm32 -D__arm32__ -D__arm__ -D__NetBSD__ \
+#define CPP_PREDEFINES "-D__arm32__ -D__arm__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__ \
-Asystem(unix) -Asystem(NetBSD) -Acpu(arm) -Amachine(arm)"
-/* Define _POSIX_SOURCE if necessary. */
-#undef CPP_SPEC
-#define CPP_SPEC "\
-%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %(cpp_endian) \
-%{posix:-D_POSIX_SOURCE} \
-"
-
/* Because TARGET_DEFAULT sets ARM_FLAG_APCS_32 */
#undef CPP_APCS_PC_DEFAULT_SPEC
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
@@ -72,13 +76,6 @@
#undef CPP_FLOAT_DEFAULT_SPEC
#define CPP_FLOAT_DEFAULT_SPEC "-D__SOFTFP__"
-/* Pass -X to the linker so that it will strip symbols starting with 'L' */
-#undef LINK_SPEC
-#define LINK_SPEC "\
--X %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} \
-%{static:-Bstatic} %{assert*} \
-"
-
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
@@ -94,6 +91,9 @@
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
+#undef MAX_WCHAR_TYPE_SIZE
+#define MAX_WCHAR_TYPE_SIZE 16
+
#define HANDLE_SYSV_PRAGMA
/* We don't have any limit on the length as out debugger is GDB. */
@@ -111,11 +111,6 @@
fprintf(STREAM, "\tmov\t%sip, %slr\n", REGISTER_PREFIX, REGISTER_PREFIX); \
fprintf(STREAM, "\tbl\tmcount\n"); \
}
-
-/* On the ARM `@' introduces a comment, so we must use something else
- for .type directives. */
-#undef TYPE_OPERAND_FMT
-#define TYPE_OPERAND_FMT "%%%s"
/* NetBSD uses the old PCC style aggregate returning conventions. */
#undef DEFAULT_PCC_STRUCT_RETURN

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ak,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/i386/gas.h.orig 2000/07/26 00:18:22 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/i386/gas.h 2001/05/30 09:04:13 1.2
@@ -150,7 +150,7 @@
#undef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
- sprintf ((BUF), ".%s%d", (PREFIX), (NUMBER))
+ sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER))
/* This is how to output an internal numbered label where
PREFIX is the class of label and NUM is the number within the class. */

View file

@ -1,53 +0,0 @@
$NetBSD: patch-al,v 1.6 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/i386/i386.h.orig 2000/07/26 00:18:23 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/i386/i386.h 2001/06/01 13:31:46 1.2
@@ -258,15 +258,15 @@
option if the fixed part matches. The actual option name is made
by appending `-m' to the specified name. */
#define TARGET_OPTIONS \
-{ { "cpu=", &ix86_cpu_string, "Schedule code for given CPU"}, \
- { "arch=", &ix86_arch_string, "Generate code for given CPU"}, \
- { "reg-alloc=", &i386_reg_alloc_order, "Control allocation order of integer registers" }, \
- { "regparm=", &i386_regparm_string, "Number of registers used to pass integer arguments" }, \
- { "align-loops=", &i386_align_loops_string, "Loop code aligned to this power of 2" }, \
- { "align-jumps=", &i386_align_jumps_string, "Jump targets are aligned to this power of 2" }, \
- { "align-functions=", &i386_align_funcs_string, "Function starts are aligned to this power of 2" }, \
- { "preferred-stack-boundary=", &i386_preferred_stack_boundary_string, "Attempt to keep stack aligned to this power of 2" }, \
- { "branch-cost=", &i386_branch_cost_string, "Branches are this expensive (1-5, arbitrary units)" }, \
+{ { "cpu=", (const char **)&ix86_cpu_string, "Schedule code for given CPU"}, \
+ { "arch=", (const char **)&ix86_arch_string, "Generate code for given CPU"}, \
+ { "reg-alloc=", (const char **)&i386_reg_alloc_order, "Control allocation order of integer registers" }, \
+ { "regparm=", (const char **)&i386_regparm_string, "Number of registers used to pass integer arguments" }, \
+ { "align-loops=", (const char **)&i386_align_loops_string, "Loop code aligned to this power of 2" }, \
+ { "align-jumps=", (const char **)&i386_align_jumps_string, "Jump targets are aligned to this power of 2" }, \
+ { "align-functions=", (const char **)&i386_align_funcs_string, "Function starts are aligned to this power of 2" }, \
+ { "preferred-stack-boundary=", (const char **)&i386_preferred_stack_boundary_string, "Attempt to keep stack aligned to this power of 2" }, \
+ { "branch-cost=", (const char **)&i386_branch_cost_string, "Branches are this expensive (1-5, arbitrary units)" }, \
SUBTARGET_OPTIONS \
}
@@ -2773,15 +2773,15 @@
#endif
/* Variables in i386.c */
-extern char *ix86_cpu_string; /* for -mcpu=<xxx> */
-extern char *ix86_arch_string; /* for -march=<xxx> */
-extern char *i386_reg_alloc_order; /* register allocation order */
-extern char *i386_regparm_string; /* # registers to use to pass args */
-extern char *i386_align_loops_string; /* power of two alignment for loops */
-extern char *i386_align_jumps_string; /* power of two alignment for non-loop jumps */
-extern char *i386_align_funcs_string; /* power of two alignment for functions */
+extern char *ix86_cpu_string; /* for -mcpu=<xxx> */
+extern char *ix86_arch_string; /* for -march=<xxx> */
+extern char *i386_reg_alloc_order; /* register allocation order */
+extern char *i386_regparm_string; /* # registers to use to pass args */
+extern char *i386_align_loops_string; /* power of two alignment for loops */
+extern char *i386_align_jumps_string; /* power of two alignment for non-loop jumps */
+extern char *i386_align_funcs_string; /* power of two alignment for functions */
extern char *i386_preferred_stack_boundary_string;/* power of two alignment for stack boundary */
-extern char *i386_branch_cost_string; /* values 1-5: see jump.c */
+extern char *i386_branch_cost_string; /* values 1-5: see jump.c */
extern int i386_regparm; /* i386_regparm_string as a number */
extern int i386_align_loops; /* power of two alignment for loops */
extern int i386_align_jumps; /* power of two alignment for non-loop jumps */

View file

@ -1,13 +0,0 @@
$NetBSD: patch-am,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/i386/netbsd.h.orig 2000/07/26 00:18:24 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/i386/netbsd.h 2001/07/18 13:54:20 1.2
@@ -15,7 +15,7 @@
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Di386 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386)"
+#define CPP_PREDEFINES "-D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386)"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"

View file

@ -1,14 +0,0 @@
$NetBSD: patch-an,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/m68k/m68k.c.orig 2000/07/26 00:18:31 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/m68k/m68k.c 2001/12/16 18:28:15 1.2
@@ -462,7 +462,8 @@
-cfa_store_offset + n_regs++ * 4);
}
}
- if (flag_pic && current_function_uses_pic_offset_table)
+ if (flag_pic && current_function_uses_pic_offset_table &&
+ regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
{
#ifdef MOTOROLA
asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",

View file

@ -1,19 +0,0 @@
$NetBSD: patch-ao,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/m68k/netbsd.h.orig 2000/07/26 00:18:32 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/m68k/netbsd.h 2001/06/18 16:08:51 1.2
@@ -17,7 +17,7 @@
/* Names to predefine in the preprocessor for this target machine. */
-#define CPP_PREDEFINES "-Dunix -Dm68k -Dmc68000 -Dmc68020 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(m68k) -Amachine(m68k)"
+#define CPP_PREDEFINES "-Dm68k -Dmc68000 -Dmc68020 -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__ -Asystem(unix) -Asystem(NetBSD) -Acpu(m68k) -Amachine(m68k)"
/* Make gcc agree with <machine/ansi.h> */
@@ -61,3 +61,5 @@
and initialization stuff better. */
#define DWARF2_UNWIND_INFO 0
+/* NetBSD a.out allows more than 16-bit alignment of elements and data. */
+#define MAX_OFILE_ALIGNMENT 32

View file

@ -1,42 +0,0 @@
$NetBSD: patch-ap,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/mips/mips.c.orig 2000/07/26 00:18:38 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/mips/mips.c 2001/07/19 23:41:12 1.3
@@ -93,7 +93,7 @@
static void block_move_loop PROTO ((rtx, rtx, int, int,
rtx, rtx));
static void block_move_call PROTO ((rtx, rtx, rtx));
-static FILE *make_temp_file PROTO ((void));
+static FILE *xmake_temp_file PROTO ((void));
static void save_restore_insns PROTO ((int, rtx,
long, FILE *));
static void mips16_output_gp_offset PROTO ((FILE *, rtx));
@@ -5076,7 +5076,7 @@
#endif
static FILE *
-make_temp_file ()
+xmake_temp_file ()
{
FILE *stream;
const char *base = getenv ("TMPDIR");
@@ -5295,7 +5295,7 @@
if (TARGET_FILE_SWITCHING && ! TARGET_MIPS16)
{
asm_out_data_file = stream;
- asm_out_text_file = make_temp_file ();
+ asm_out_text_file = xmake_temp_file ();
}
else
@@ -6278,8 +6278,10 @@
fprintf (file, "\t.cprestore %ld\n", current_frame_info.args_size);
}
+#ifdef DWARF2_UNWIND_INFO
if (dwarf2out_do_frame ())
dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, tsize);
+#endif
}
}

View file

@ -1,384 +0,0 @@
$NetBSD: patch-aq,v 1.4 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/mips/netbsd.h.orig 2000/07/26 00:18:39 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/mips/netbsd.h 2001/11/08 07:21:54 1.6
@@ -18,210 +18,189 @@
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define DECSTATION
+/* Define default target values. */
-/* Look for the include files in the system-defined places. */
+#ifdef TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN
+#else
+#define TARGET_ENDIAN_DEFAULT 0
+#endif
-#ifndef CROSS_COMPILE
-#undef GPLUSPLUS_INCLUDE_DIR
-#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
-
-#undef GCC_INCLUDE_DIR
-#define GCC_INCLUDE_DIR "/usr/include"
-
-#undef INCLUDE_DEFAULTS
-#define INCLUDE_DEFAULTS \
- { \
- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \
- { GCC_INCLUDE_DIR, "GCC", 0, 0 }, \
- { 0, 0, 0, 0 } \
- }
+#ifndef MACHINE_TYPE
+#ifdef TARGET_BIG_ENDIAN_DEFAULT
+#define MACHINE_TYPE "NetBSD ELF/mipseb"
+#else
+#define MACHINE_TYPE "NetBSD ELF/mipsel"
+#endif
+#endif
-/* Under NetBSD, the normal location of the various *crt*.o files is the
- /usr/lib directory. */
+#define TARGET_MEM_FUNCTIONS
-#undef STANDARD_STARTFILE_PREFIX
-#define STANDARD_STARTFILE_PREFIX "/usr/lib/"
-#endif
+#define TARGET_DEFAULT (MASK_GAS|MASK_ABICALLS)
+#undef DWARF2_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-/* Provide a LINK_SPEC appropriate for NetBSD. Here we provide support
- for the special GCC options -static, -assert, and -nostdlib. */
+/* Include the generic MIPS ELF configuration. */
+#include <mips/elf.h>
-#undef LINK_SPEC
-#define LINK_SPEC \
- "%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
- %{!nostartfiles:%{!r*:%{!e*:-e __start}}} -dc -dp %{static:-Bstatic} %{assert*}"
+/* Now clean up after it. */
+#undef OBJECT_FORMAT_COFF
+#undef INVOKE__main
+#undef NAME__MAIN
+#undef SYMBOL__MAIN
+#undef CTOR_LIST_BEGIN
+#undef CTOR_LIST_END
+#undef DTOR_LIST_BEGIN
+#undef DTOR_LIST_END
-/* We have atexit(3). */
+/* Get generic NetBSD definitions. */
-#define HAVE_ATEXIT
+#define NETBSD_ELF
+#include <netbsd.h>
/* Implicit library calls should use memcpy, not bcopy, etc. */
-#define TARGET_MEM_FUNCTIONS
-
/* Define mips-specific netbsd predefines... */
-#ifndef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__ANSI_COMPAT \
--DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__NetBSD__ -Dmips \
--D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \
--Dunix -D_R3000 \
--Asystem(unix) -Asystem(NetBSD) -Amachine(mips)"
-#endif
-
-#ifndef SUBTARGET_CPP_SPEC
-#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
-#endif
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
-#define STARTFILE_SPEC ""
-
-#ifndef MACHINE_TYPE
-#define MACHINE_TYPE "NetBSD/pmax"
+#undef CPP_PREDEFINES
+#ifdef TARGET_BIG_ENDIAN_DEFAULT
+#define CPP_PREDEFINES \
+ "-D__ANSI_COMPAT -DMIPSEB -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \
+ -D__NetBSD__ -D__ELF__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \
+ -D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)"
+#else
+#define CPP_PREDEFINES \
+ "-D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \
+ -D__NetBSD__ -D__ELF__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \
+ -D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)"
#endif
-#define TARGET_DEFAULT MASK_GAS
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-
-#include "mips/mips.h"
+#undef ASM_SPEC
+#define ASM_SPEC \
+ "%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \
+ %{noasmopt:-O0} \
+ %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \
+ %{g} %{g0} %{g1} %{g2} %{g3} \
+ %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \
+ %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
+ %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
+ %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \
+ %{membedded-pic} %{fpic:-k} %{fPIC:-k -K}"
-/*
- * Some imports from svr4.h in support of shared libraries.
- * Currently, we need the DECLARE_OBJECT_SIZE stuff.
- */
-
-/* Define the strings used for the special svr4 .type and .size directives.
- These strings generally do not vary from one system running svr4 to
- another, but if a given system (e.g. m88k running svr) needs to use
- different pseudo-op names for these, they may be overridden in the
- file which includes this one. */
-
-#undef TYPE_ASM_OP
-#undef SIZE_ASM_OP
-#undef WEAK_ASM_OP
-#define TYPE_ASM_OP ".type"
-#define SIZE_ASM_OP ".size"
-#define WEAK_ASM_OP ".weak"
-
-/* The following macro defines the format used to output the second
- operand of the .type assembler directive. Different svr4 assemblers
- expect various different forms for this operand. The one given here
- is just a default. You may need to override it in your machine-
- specific tm.h file (depending upon the particulars of your assembler). */
-
-#undef TYPE_OPERAND_FMT
-#define TYPE_OPERAND_FMT "@%s"
-
-/* Write the extra assembler code needed to declare a function's result.
- Most svr4 assemblers don't require any special declaration of the
- result value, but there are exceptions. */
+/* Provide a LINK_SPEC appropriate for a NetBSD ELF target. */
-#ifndef ASM_DECLARE_RESULT
-#define ASM_DECLARE_RESULT(FILE, RESULT)
-#endif
-
-/* These macros generate the special .type and .size directives which
- are used to set the corresponding fields of the linker symbol table
- entries in an ELF object file under SVR4. These macros also output
- the starting labels for the relevant functions/objects. */
-
-/* Write the extra assembler code needed to declare a function properly.
- Some svr4 assemblers need to also have something extra said about the
- function's return value. We allow for that here. */
-
-#undef ASM_DECLARE_FUNCTION_NAME
-#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
- do { \
- fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
- assemble_name (FILE, NAME); \
- putc (',', FILE); \
- fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
- putc ('\n', FILE); \
- ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
- } while (0)
-
-/* Write the extra assembler code needed to declare an object properly. */
-
-#undef ASM_DECLARE_OBJECT_NAME
-#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
- do { \
- fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
- assemble_name (FILE, NAME); \
- putc (',', FILE); \
- fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
- putc ('\n', FILE); \
- size_directive_output = 0; \
- if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
- { \
- size_directive_output = 1; \
- fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
- } \
- ASM_OUTPUT_LABEL(FILE, NAME); \
- } while (0)
-
-/* Output the size directive for a decl in rest_of_decl_compilation
- in the case where we did not do so before the initializer.
- Once we find the error_mark_node, we know that the value of
- size_directive_output was set
- by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
-
-#undef ASM_FINISH_DECLARE_OBJECT
-#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
-do { \
- char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
- if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
- && ! AT_END && TOP_LEVEL \
- && DECL_INITIAL (DECL) == error_mark_node \
- && !size_directive_output) \
- { \
- size_directive_output = 1; \
- fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
- assemble_name (FILE, name); \
- fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
- } \
- } while (0)
-
-/* This is how to declare the size of a function. */
-
-#undef ASM_DECLARE_FUNCTION_SIZE
-#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
- do { \
- if (!flag_inhibit_size_directive) \
- { \
- char label[256]; \
- static int labelno; \
- labelno++; \
- ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
- ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
- fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
- assemble_name (FILE, (FNAME)); \
- fprintf (FILE, ","); \
- assemble_name (FILE, label); \
- fprintf (FILE, "-"); \
- assemble_name (FILE, (FNAME)); \
- putc ('\n', FILE); \
- } \
- } while (0)
-
-/*
- A C statement to output something to the assembler file to switch to section
- NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
- NULL_TREE. Some target formats do not support arbitrary sections. Do not
- define this macro in such cases.
-*/
-#define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \
-do { \
- extern FILE *asm_out_text_file; \
- if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
- fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \
- else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
- fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \
- else \
- fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \
-} while (0)
-
-/* Since gas and gld are standard on NetBSD, we don't need these */
-#undef ASM_FINAL_SPEC
-#undef STARTFILE_SPEC
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{assert*} \
+ %{EL:-m elf32lmip} \
+ %{EB:-m elf32bmip} \
+ %{R*} %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
+ %{shared} %{v} \
+ %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \
+ %{!shared: \
+ -dc -dp \
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
+ %{static:-static}}"
+
+/* Provide CC1_SPEC appropriate for NetBSD/mips ELF platforms */
+
+#undef CC1_SPEC
+#define CC1_SPEC \
+ "%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
+ %{mips1:-mfp32 -mgp32}%{mips2:-mfp32 -mgp32}\
+ %{mips3:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} \
+ %{mips4:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} \
+ %{mfp64:%{msingle-float:%emay not use both -mfp64 and -msingle-float}} \
+ %{mfp64:%{m4650:%emay not use both -mfp64 and -m4650}} \
+ %{m4650:-mcpu=r4650} \
+ %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \
+ %{pic-none: -mno-half-pic} \
+ %{pic-lib: -mhalf-pic} \
+ %{pic-extern: -mhalf-pic} \
+ %{pic-calls: -mhalf-pic} \
+ %{save-temps: }"
+
+#undef CPP_SPEC
+#define CPP_SPEC \
+ "%{posix:-D_POSIX_SOURCE} \
+ %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
+ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
+ %{mips3:-U__mips -D__mips=3 -D__mips64} \
+ %{mgp32:-U__mips64} %{mgp64:-D__mips64}"
+
+/* Trampoline code for closures should call _cacheflush()
+ to ensure I-cache consistency after writing trampoline code. */
+
+#define MIPS_CACHEFLUSH_FUNC "_cacheflush"
+
+/* Use sjlj exceptions. */
+#define DWARF2_UNWIND_INFO 0
+
+/* Turn off special section processing by default. */
+#undef MIPS_DEFAULT_GVALUE
+#define MIPS_DEFAULT_GVALUE 0
+
+/* This defines which switch letters take arguments. -G is a mips special. */
+#undef SWITCH_TAKES_ARG
+#define SWITCH_TAKES_ARG(CHAR) \
+ (DEFAULT_SWITCH_TAKES_ARG(CHAR) || (CHAR) == 'R' || (CHAR) == 'G')
+
+/* Support const sections and the ctors and dtors sections for g++.
+ Note that there appears to be two different ways to support const
+ sections at the moment. You can either #define the symbol
+ READONLY_DATA_SECTION (giving it some code which switches to the
+ readonly data section) or else you can #define the symbols
+ EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and
+ SELECT_RTX_SECTION. We do both here just to be on the safe side. */
+
+#define CONST_SECTION_ASM_OP ".section\t.rodata"
+
+/* On svr4, we *do* have support for the .init and .fini sections, and we
+ can put stuff in there to be executed before and after `main'. We let
+ crtstuff.c and other files know this by defining the following symbols.
+ The definitions say how to change sections to the .init and .fini
+ sections. This is the same for all known svr4 assemblers. */
+
+#define INIT_SECTION_ASM_OP ".section\t.init"
+#define FINI_SECTION_ASM_OP ".section\t.fini"
+
+/* A default list of other sections which we might be "in" at any given
+ time. For targets that use additional sections (e.g. .tdesc) you
+ should override this definition in the target-specific file which
+ includes this file. */
+/* Note that this is to be like the generic ELF EXTRA_SECTIONS, with the
+ MIPS specific in_sdata and in_rdata added. */
+
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_sdata, in_rdata
+
+/* A default list of extra section function definitions. For targets
+ that use additional sections (e.g. .tdesc) you should override this
+ definition in the target-specific file which includes this file. */
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS \
+ SECTION_FUNCTION_TEMPLATE(const_section, in_const, CONST_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(ctors_section, in_ctors, CTORS_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(dtors_section, in_dtors, DTORS_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP)
+
+#undef READONLY_DATA_SECTION
+#define READONLY_DATA_SECTION() const_section ()
+
+#undef SECTION_FUNCTION_TEMPLATE
+#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \
+void \
+FN () \
+{ \
+ if (in_section != ENUM) \
+ { \
+ fprintf (asm_out_file, "%s\n", OP); \
+ in_section = ENUM; \
+ } \
+}

View file

@ -1,12 +0,0 @@
$NetBSD: patch-ar,v 1.4 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/ns32k/xm-ns32k.h.orig 2000/07/26 00:18:44 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/ns32k/xm-ns32k.h 2001/09/23 13:42:39 1.2
@@ -36,7 +36,3 @@
/* Arguments to use with `exit'. */
#define SUCCESS_EXIT_CODE 0
#define FATAL_EXIT_CODE 33
-
-#define memcpy(src,dst,len) bcopy ((dst),(src),(len))
-#define memset gcc_memset
-#define memcmp(left,right,len) bcmp ((left),(right),(len))

View file

@ -1,15 +0,0 @@
$NetBSD: patch-as,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/rs6000/rs6000.c.orig 2001/04/23 12:00:34 1.1.1.2
+++ ../gcc-2.95.3/gcc/config/rs6000/rs6000.c 2001/10/26 03:14:55 1.2
@@ -1004,8 +1004,9 @@
&& CONST_DOUBLE_HIGH (op) == 0
&& (CONST_DOUBLE_LOW (op) & (~ (HOST_WIDE_INT) 0xffff)) != 0
&& (CONST_DOUBLE_LOW (op)
- & (~ (unsigned HOST_WIDE_INT) 0xffff0000u)) != 0));
+ & (~ (unsigned HOST_WIDE_INT) 0xffff0000u)) != 0)
#endif
+ );
}
/* Return 1 if C is a constant that can be encoded in a 32-bit mask on the

View file

@ -1,24 +0,0 @@
$NetBSD: patch-at,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/sh/sh.c.orig 2000/07/26 00:18:49 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/sh/sh.c 2001/12/16 18:47:47 1.3
@@ -515,6 +515,7 @@
if ((code != EQ && code != NE
&& (sh_compare_op1 != const0_rtx
|| code == GTU || code == GEU || code == LTU || code == LEU))
+ || (mode == DImode && sh_compare_op1 != const0_rtx)
|| TARGET_SH3E && GET_MODE_CLASS (mode) == MODE_FLOAT)
sh_compare_op1 = force_reg (mode, sh_compare_op1);
@@ -823,9 +824,9 @@
char *
output_ieee_ccmpeq (insn, operands)
- rtx insn, operands;
+ rtx insn, *operands;
{
- output_branchy_insn (NE, "bt\t%l9\\;fcmp/eq\t%1,%0", insn, operands);
+ return output_branchy_insn (NE, "bt\t%l9\\;fcmp/eq\t%1,%0", insn, operands);
}
/* Output to FILE the start of the assembler file. */

View file

@ -1,32 +0,0 @@
$NetBSD: patch-au,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/sh/sh.h.orig 2000/07/26 00:18:49 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/sh/sh.h 2001/12/16 18:56:45 1.4
@@ -1681,7 +1681,7 @@
it uses this information. Hence, the general register <-> floating point
register information here is not used for SFmode. */
#define REGISTER_MOVE_COST(SRCCLASS, DSTCLASS) \
- ((((DSTCLASS) == T_REGS) || ((DSTCLASS) == PR_REG)) ? 10 \
+ ((((DSTCLASS) == T_REGS) || ((DSTCLASS) == PR_REGS)) ? 10 \
: ((((DSTCLASS) == FP0_REGS || (DSTCLASS) == FP_REGS || (DSTCLASS) == DF_REGS) \
&& ((SRCCLASS) == GENERAL_REGS || (SRCCLASS) == R0_REGS)) \
|| (((DSTCLASS) == GENERAL_REGS || (DSTCLASS) == R0_REGS) \
@@ -1796,10 +1796,10 @@
}
#define ASM_OUTPUT_REG_PUSH(file, v) \
- fprintf ((file), "\tmov.l\tr%s,-@r15\n", (v));
+ fprintf ((file), "\tmov.l\tr%d,@-r15\n", (v));
#define ASM_OUTPUT_REG_POP(file, v) \
- fprintf ((file), "\tmov.l\t@r15+,r%s\n", (v));
+ fprintf ((file), "\tmov.l\t@r15+,r%d\n", (v));
/* The assembler's names for the registers. RFP need not always be used as
the Real framepointer; it can also be used as a normal general register.
@@ -2214,3 +2214,5 @@
#define SH_DYNAMIC_SHIFT_COST \
(TARGET_HARD_SH4 ? 1 : TARGET_SH3 ? (TARGET_SMALLCODE ? 1 : 2) : 20)
+
+#define DWARF_LINE_MIN_INSTR_LENGTH 2

View file

@ -1,29 +0,0 @@
$NetBSD: patch-av,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/sparc/netbsd.h.orig 2000/07/26 00:18:50 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/sparc/netbsd.h 2001/05/30 18:47:25 1.2
@@ -7,15 +7,15 @@
/* Names to predefine in the preprocessor for this target machine. */
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Dsparc -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(sparc) -Amachine(sparc)"
+#define CPP_PREDEFINES "-Dsparc -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__ -Asystem(unix) -Asystem(NetBSD) -Acpu(sparc) -Amachine(sparc)"
/* Make gcc agree with <machine/ansi.h> */
#undef SIZE_TYPE
-#define SIZE_TYPE "unsigned int"
+#define SIZE_TYPE "long unsigned int"
#undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE "int"
+#define PTRDIFF_TYPE "long int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
@@ -44,3 +44,5 @@
and initialization stuff better. */
#define DWARF2_UNWIND_INFO 0
+/* Name the default cpu target */
+#define TARGET_CPU_DEFAULT TARGET_CPU_sparc

View file

@ -1,280 +0,0 @@
$NetBSD: patch-aw,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/sparc/sparc.c.orig 2001/04/23 12:00:42 1.1.1.2
+++ ../gcc-2.95.3/gcc/config/sparc/sparc.c 2002/03/28 08:14:56 1.5
@@ -142,6 +142,8 @@
int sparc_align_jumps;
int sparc_align_funcs;
+char sparc_hard_reg_printed[8];
+
struct sparc_cpu_select sparc_select[] =
{
/* switch name, tune arch */
@@ -213,8 +215,11 @@
/* TEMIC sparclet */
{ "tsc701", PROCESSOR_TSC701, MASK_ISA, MASK_SPARCLET },
{ "v9", PROCESSOR_V9, MASK_ISA, MASK_V9 },
- /* TI ultrasparc */
- { "ultrasparc", PROCESSOR_ULTRASPARC, MASK_ISA, MASK_V9 },
+ /* TI ultrasparc I, II, IIi */
+ { "ultrasparc", PROCESSOR_ULTRASPARC, MASK_ISA, MASK_V9
+ /* Although insns using %y are deprecated, it is a clear win on current
+ ultrasparcs. */
+ |MASK_DEPRECATED_V8_INSNS },
{ 0, 0, 0, 0 }
};
struct cpu_table *cpu;
@@ -368,7 +373,7 @@
sparc_init_modes ();
if ((profile_flag || profile_block_flag)
- && sparc_cmodel != CM_MEDLOW)
+ && sparc_cmodel != CM_32 && sparc_cmodel != CM_MEDLOW)
{
error ("profiling does not support code models other than medlow");
}
@@ -3108,6 +3113,32 @@
}
}
+/* Output any necessary .register pseudo-ops. */
+void
+sparc_output_scratch_registers (file)
+ FILE *file;
+{
+#ifdef HAVE_AS_REGISTER_PSEUDO_OP
+ int i;
+
+ if (TARGET_ARCH32)
+ return;
+
+ /* Check if %g[2367] were used without
+ .register being printed for them already. */
+ for (i = 2; i < 8; i++)
+ {
+ if (regs_ever_live [i]
+ && ! sparc_hard_reg_printed [i])
+ {
+ sparc_hard_reg_printed [i] = 1;
+ fprintf (file, "\t.register\t%%g%d, #scratch\n", i);
+ }
+ if (i == 3) i = 5;
+ }
+#endif
+}
+
/* Output code for the function prologue. */
void
@@ -3116,6 +3147,8 @@
int size;
int leaf_function;
{
+ sparc_output_scratch_registers (file);
+
/* Need to use actual_fsize, since we are also allocating
space for our callee (and our own register save area). */
actual_fsize = compute_frame_size (size, leaf_function);
@@ -3753,6 +3786,14 @@
while (intslots > 0);
}
+/* A subroutine of function_arg_record_value. Traverse the structure
+ recusively and determine how many registers will be required. */
+
+/* A subroutine of function_arg_record_value. Traverse the structure
+ recursively and assign bits to floating point registers. Track which
+ bits in between need integer registers; invoke function_arg_record_value_3
+ to make that happen. */
+
static void
function_arg_record_value_2 (type, startbitpos, parms)
tree type;
@@ -3812,6 +3853,9 @@
}
}
+/* Used by function_arg and function_value to implement the complex
+ Sparc64 structure calling conventions. */
+
static rtx
function_arg_record_value (type, mode, slotno, named, regbase)
tree type;
@@ -3834,10 +3878,12 @@
if (parms.intoffset != -1)
{
+ unsigned int startbit, endbit;
int intslots, this_slotno;
- intslots = (typesize*BITS_PER_UNIT - parms.intoffset + BITS_PER_WORD - 1)
- / BITS_PER_WORD;
+ startbit = parms.intoffset & -BITS_PER_WORD;
+ endbit = (typesize*BITS_PER_UNIT + BITS_PER_WORD - 1) & -BITS_PER_WORD;
+ intslots = (endbit - startbit) / BITS_PER_WORD;
this_slotno = slotno + parms.intoffset / BITS_PER_WORD;
intslots = MIN (intslots, SPARC_INT_ARG_MAX - this_slotno);
@@ -4532,6 +4578,152 @@
return string;
}
+/* Emit a library call comparison between floating point X and Y.
+ COMPARISON is the rtl operator to compare with (EQ, NE, GT, etc.).
+ TARGET_ARCH64 uses _Qp_* functions, which use pointers to TFmode
+ values as arguments instead of the TFmode registers themselves,
+ that's why we cannot call emit_float_lib_cmp. */
+void
+sparc_emit_float_lib_cmp (x, y, comparison)
+ rtx x, y;
+ enum rtx_code comparison;
+{
+ char *qpfunc;
+ rtx slot0, slot1, result, tem, tem2;
+ enum machine_mode mode;
+
+ switch (comparison)
+ {
+ case EQ:
+ qpfunc = (TARGET_ARCH64) ? "_Qp_feq" : "_Q_feq";
+ break;
+
+ case NE:
+ qpfunc = (TARGET_ARCH64) ? "_Qp_fne" : "_Q_fne";
+ break;
+
+ case GT:
+ qpfunc = (TARGET_ARCH64) ? "_Qp_fgt" : "_Q_fgt";
+ break;
+
+ case GE:
+ qpfunc = (TARGET_ARCH64) ? "_Qp_fge" : "_Q_fge";
+ break;
+
+ case LT:
+ qpfunc = (TARGET_ARCH64) ? "_Qp_flt" : "_Q_flt";
+ break;
+
+ case LE:
+ qpfunc = (TARGET_ARCH64) ? "_Qp_fle" : "_Q_fle";
+ break;
+
+ /* case UNORDERED:
+ case UNGT:
+ case UNLT:
+ case UNEQ:
+ case UNGE:
+ case UNLE:
+ case LTGT:
+ qpfunc = (TARGET_ARCH64) ? "_Qp_cmp" : "_Q_cmp";
+ break;
+ */
+ default:
+ abort();
+ break;
+ }
+
+ if (TARGET_ARCH64)
+ {
+ if (GET_CODE (x) != MEM)
+ {
+ slot0 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode), 0);
+ emit_insn (gen_rtx_SET (VOIDmode, slot0, x));
+ }
+ else
+ slot0 = x;
+
+ if (GET_CODE (y) != MEM)
+ {
+ slot1 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode), 0);
+ emit_insn (gen_rtx_SET (VOIDmode, slot1, y));
+ }
+ else
+ slot1 = y;
+
+ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, qpfunc), 1,
+ DImode, 2,
+ XEXP (slot0, 0), Pmode,
+ XEXP (slot1, 0), Pmode);
+
+ mode = DImode;
+ }
+ else
+ {
+ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, qpfunc), 1,
+ SImode, 2,
+ x, TFmode, y, TFmode);
+
+ mode = SImode;
+ }
+
+
+ /* Immediately move the result of the libcall into a pseudo
+ register so reload doesn't clobber the value if it needs
+ the return register for a spill reg. */
+ result = gen_reg_rtx (mode);
+ emit_move_insn (result, hard_libcall_value (mode));
+
+ switch (comparison)
+ {
+ default:
+ emit_cmp_insn (result, const0_rtx, NE,
+ NULL_RTX, mode, 0, 0);
+ break;
+ /* case ORDERED:
+ case UNORDERED:
+ emit_cmp_insn (result, GEN_INT(3),
+ (comparison == UNORDERED) ? EQ : NE,
+ NULL_RTX, mode, 0, 0);
+ break;
+ case UNGT:
+ case UNGE:
+ emit_cmp_insn (result, const1_rtx,
+ (comparison == UNGT) ? GT : NE,
+ NULL_RTX, mode, 0, 0);
+ break;
+ case UNLE:
+ emit_cmp_insn (result, const2_rtx, NE,
+ NULL_RTX, mode, 0, 0);
+ break;
+ case UNLT:
+ tem = gen_reg_rtx (mode);
+ if (TARGET_ARCH32)
+ emit_insn (gen_andsi3 (tem, result, const1_rtx));
+ else
+ emit_insn (gen_anddi3 (tem, result, const1_rtx));
+ emit_cmp_insn (tem, const0_rtx, NE,
+ NULL_RTX, mode, 0, 0);
+ break;
+ case UNEQ:
+ case LTGT:
+ tem = gen_reg_rtx (mode);
+ if (TARGET_ARCH32)
+ emit_insn (gen_addsi3 (tem, result, const1_rtx));
+ else
+ emit_insn (gen_adddi3 (tem, result, const1_rtx));
+ tem2 = gen_reg_rtx (mode);
+ if (TARGET_ARCH32)
+ emit_insn (gen_andsi3 (tem2, tem, const2_rtx));
+ else
+ emit_insn (gen_anddi3 (tem2, tem, const2_rtx));
+ emit_cmp_insn (tem2, const0_rtx,
+ (comparison == UNEQ) ? EQ : NE,
+ NULL_RTX, mode, 0, 0);
+ break;*/
+ }
+}
+
/* Return the string to output a conditional branch to LABEL, testing
register REG. LABEL is the operand number of the label; REG is the
operand number of the reg. OP is the conditional expression. The mode
@@ -5850,6 +6042,8 @@
{
char *sp_str = reg_names[STACK_POINTER_REGNUM];
unsigned long gmask = current_frame_info.gmask;
+
+ sparc_output_scratch_registers (file);
/* This is only for the human reader. */
fprintf (file, "\t%s#PROLOGUE# 0\n", ASM_COMMENT_START);

View file

@ -1,306 +0,0 @@
$NetBSD: patch-ax,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/sparc/sparc.h.orig 2000/07/26 00:18:51 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/sparc/sparc.h 2002/03/28 08:14:56 1.3
@@ -50,11 +50,11 @@
/* Code model selection.
-mcmodel is used to select the v9 code model.
- Different code models aren't supported for v8 code.
+ Different code models aren't supported for v7/8 code.
TARGET_CM_32: 32 bit address space, top 32 bits = 0,
pointers are 32 bits. Note that this isn't intended
- to imply a v8 abi.
+ to imply a v7/8 abi.
TARGET_CM_MEDLOW: 32 bit address space, top 32 bits = 0,
avoid generating %uhi and %ulo terms,
@@ -173,8 +173,8 @@
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_sparclite86x
-#define CPP_CPU32_DEFAULT_SPEC "-D__sparclite86x__ -D__sparc_v8__"
-#define ASM_CPU32_DEFAULT_SPEC "-Av8"
+#define CPP_CPU32_DEFAULT_SPEC "-D__sparclite86x__"
+#define ASM_CPU32_DEFAULT_SPEC "-Asparclite"
#endif
#endif
@@ -233,7 +233,7 @@
%{mcpu=v8:-D__sparc_v8__} \
%{mcpu=supersparc:-D__supersparc__ -D__sparc_v8__} \
%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
-%{mcpu=sparclite86x:-D__sparclite86x__ -D__sparc_v8__} \
+%{mcpu=sparclite86x:-D__sparclite86x__} \
%{mcpu=v9:-D__sparc_v9__} \
%{mcpu=ultrasparc:-D__sparc_v9__} \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
@@ -297,6 +297,7 @@
%{msparclite:-Asparclite} \
%{mf930:-Asparclite} %{mf934:-Asparclite} \
%{mcpu=sparclite:-Asparclite} \
+%{mcpu=sparclite86x:-Asparclite} \
%{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \
%{mv8plus:-Av8plus} \
%{mcpu=v9:-Av9} \
@@ -542,9 +543,8 @@
#define TARGET_VIS (target_flags & MASK_VIS)
/* Compile for Solaris V8+. 32 bit Solaris preserves the high bits of
- the current out and global registers. Linux saves the high bits on
- context switches but not signals. */
-#define MASK_V8PLUS 0x2000000
+ the current out and global registers and Linux 2.2+ as well. */
+#define MASK_V8PLUS 0x2000000
#define TARGET_V8PLUS (target_flags & MASK_V8PLUS)
/* TARGET_HARD_MUL: Use hardware multiply instructions but not %y.
@@ -555,7 +555,7 @@
#define TARGET_HARD_MUL32 \
((TARGET_V8 || TARGET_SPARCLITE \
|| TARGET_SPARCLET || TARGET_DEPRECATED_V8_INSNS) \
- && ! TARGET_V8PLUS)
+ && ! TARGET_V8PLUS && TARGET_ARCH32)
#define TARGET_HARD_MUL \
(TARGET_V8 || TARGET_SPARCLITE || TARGET_SPARCLET \
@@ -1822,6 +1822,31 @@
ASM_OUTPUT_LABEL (FILE, NAME); \
} while (0)
+/* Output the special assembly code needed to tell the assembler some
+ register is used as global register variable. */
+
+#ifdef HAVE_AS_REGISTER_PSEUDO_OP
+#define ASM_DECLARE_REGISTER_GLOBAL(FILE, DECL, REGNO, NAME) \
+do { \
+ if (TARGET_ARCH64) \
+ { \
+ int __end = HARD_REGNO_NREGS ((REGNO), DECL_MODE (decl)) + (REGNO); \
+ int __reg; \
+ extern char sparc_hard_reg_printed[8]; \
+ for (__reg = (REGNO); __reg < 8 && __reg < __end; __reg++) \
+ if ((__reg & ~1) == 2 || (__reg & ~1) == 6) \
+ { \
+ if (__reg == (REGNO)) \
+ fprintf ((FILE), "\t.register\t%%g%d, %s\n", __reg, (NAME)); \
+ else \
+ fprintf ((FILE), "\t.register\t%%g%d, .gnu.part%d.%s\n", \
+ __reg, __reg - (REGNO), (NAME)); \
+ sparc_hard_reg_printed[__reg] = 1; \
+ } \
+ } \
+} while (0)
+#endif
+
/* This macro generates the assembly code for function entry.
FILE is a stdio stream to output the code to.
SIZE is an int: how many units of temporary storage to allocate.
@@ -2234,6 +2259,14 @@
: 0))
#endif
+/* Should gcc use [%reg+%lo(xx)+offset] addresses? */
+
+#ifdef HAVE_AS_OFFSETABLE_LO10
+#define USE_AS_OFFSETABLE_LO10 1
+#else
+#define USE_AS_OFFSETABLE_LO10 0
+#endif
+
/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
that is a valid memory address for an instruction.
The MODE argument is the machine mode for the MEM expression
@@ -2258,6 +2291,9 @@
#define RTX_OK_FOR_OFFSET_P(X) \
(GET_CODE (X) == CONST_INT && INTVAL (X) >= -0x1000 && INTVAL (X) < 0x1000)
+
+#define RTX_OK_FOR_OLO10_P(X) \
+ (GET_CODE (X) == CONST_INT && INTVAL (X) >= -0x1000 && INTVAL (X) < 0xc00 - 8)
#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
{ if (RTX_OK_FOR_BASE_P (X)) \
@@ -2309,6 +2345,30 @@
|| RTX_OK_FOR_OFFSET_P (op0)) \
goto ADDR; \
} \
+ else if (USE_AS_OFFSETABLE_LO10 \
+ && GET_CODE (op0) == LO_SUM \
+ && TARGET_ARCH64 \
+ && ! TARGET_CM_MEDMID \
+ && RTX_OK_FOR_OLO10_P (op1)) \
+ { \
+ register rtx op00 = XEXP (op0, 0); \
+ register rtx op01 = XEXP (op0, 1); \
+ if (RTX_OK_FOR_BASE_P (op00) \
+ && CONSTANT_P (op01)) \
+ goto ADDR; \
+ } \
+ else if (USE_AS_OFFSETABLE_LO10 \
+ && GET_CODE (op1) == LO_SUM \
+ && TARGET_ARCH64 \
+ && ! TARGET_CM_MEDMID \
+ && RTX_OK_FOR_OLO10_P (op0)) \
+ { \
+ register rtx op10 = XEXP (op1, 0); \
+ register rtx op11 = XEXP (op1, 1); \
+ if (RTX_OK_FOR_BASE_P (op10) \
+ && CONSTANT_P (op11)) \
+ goto ADDR; \
+ } \
} \
else if (GET_CODE (X) == LO_SUM) \
{ \
@@ -2565,26 +2625,25 @@
#define MULSI3_LIBCALL "*.umul"
/* Define library calls for quad FP operations. These are all part of the
- SPARC ABI.
- ??? ARCH64 still does not work as the _Qp_* routines take pointers. */
-#define ADDTF3_LIBCALL (TARGET_ARCH64 ? "_Qp_add" : "_Q_add")
-#define SUBTF3_LIBCALL (TARGET_ARCH64 ? "_Qp_sub" : "_Q_sub")
-#define NEGTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_neg" : "_Q_neg")
-#define MULTF3_LIBCALL (TARGET_ARCH64 ? "_Qp_mul" : "_Q_mul")
-#define DIVTF3_LIBCALL (TARGET_ARCH64 ? "_Qp_div" : "_Q_div")
-#define FLOATSITF2_LIBCALL (TARGET_ARCH64 ? "_Qp_itoq" : "_Q_itoq")
-#define FIX_TRUNCTFSI2_LIBCALL (TARGET_ARCH64 ? "_Qp_qtoi" : "_Q_qtoi")
-#define FIXUNS_TRUNCTFSI2_LIBCALL (TARGET_ARCH64 ? "_Qp_qtoui" : "_Q_qtou")
-#define EXTENDSFTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_stoq" : "_Q_stoq")
-#define TRUNCTFSF2_LIBCALL (TARGET_ARCH64 ? "_Qp_qtos" : "_Q_qtos")
-#define EXTENDDFTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_dtoq" : "_Q_dtoq")
-#define TRUNCTFDF2_LIBCALL (TARGET_ARCH64 ? "_Qp_qtod" : "_Q_qtod")
-#define EQTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_feq" : "_Q_feq")
-#define NETF2_LIBCALL (TARGET_ARCH64 ? "_Qp_fne" : "_Q_fne")
-#define GTTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_fgt" : "_Q_fgt")
-#define GETF2_LIBCALL (TARGET_ARCH64 ? "_Qp_fge" : "_Q_fge")
-#define LTTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_flt" : "_Q_flt")
-#define LETF2_LIBCALL (TARGET_ARCH64 ? "_Qp_fle" : "_Q_fle")
+ SPARC 32bit ABI. */
+#define ADDTF3_LIBCALL "_Q_add"
+#define SUBTF3_LIBCALL "_Q_sub"
+#define NEGTF2_LIBCALL "_Q_neg"
+#define MULTF3_LIBCALL "_Q_mul"
+#define DIVTF3_LIBCALL "_Q_div"
+#define FLOATSITF2_LIBCALL "_Q_itoq"
+#define FIX_TRUNCTFSI2_LIBCALL "_Q_qtoi"
+#define FIXUNS_TRUNCTFSI2_LIBCALL "_Q_qtou"
+#define EXTENDSFTF2_LIBCALL "_Q_stoq"
+#define TRUNCTFSF2_LIBCALL "_Q_qtos"
+#define EXTENDDFTF2_LIBCALL "_Q_dtoq"
+#define TRUNCTFDF2_LIBCALL "_Q_qtod"
+#define EQTF2_LIBCALL "_Q_feq"
+#define NETF2_LIBCALL "_Q_fne"
+#define GTTF2_LIBCALL "_Q_fgt"
+#define GETF2_LIBCALL "_Q_fge"
+#define LTTF2_LIBCALL "_Q_flt"
+#define LETF2_LIBCALL "_Q_fle"
/* We can define the TFmode sqrt optab only if TARGET_FPU. This is because
with soft-float, the SFmode and DFmode sqrt instructions will be absent,
@@ -2592,34 +2651,37 @@
for calls to the builtin function sqrt, but this fails. */
#define INIT_TARGET_OPTABS \
do { \
- add_optab->handlers[(int) TFmode].libfunc \
- = gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL); \
- sub_optab->handlers[(int) TFmode].libfunc \
- = gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL); \
- neg_optab->handlers[(int) TFmode].libfunc \
- = gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL); \
- smul_optab->handlers[(int) TFmode].libfunc \
- = gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL); \
- flodiv_optab->handlers[(int) TFmode].libfunc \
- = gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL); \
- eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \
- netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \
- gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \
- getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL); \
- lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \
- letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL); \
- trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL); \
- trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL); \
- extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL); \
- extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL); \
- floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL); \
- fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL); \
- fixunstfsi_libfunc \
- = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL); \
- if (TARGET_FPU) \
- sqrt_optab->handlers[(int) TFmode].libfunc \
- = gen_rtx_SYMBOL_REF (Pmode, "_Q_sqrt"); \
- INIT_SUBTARGET_OPTABS; \
+ if (TARGET_ARCH32) \
+ { \
+ add_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL); \
+ sub_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL); \
+ neg_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL); \
+ smul_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL); \
+ flodiv_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL); \
+ eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \
+ netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \
+ gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \
+ getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL); \
+ lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \
+ letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL); \
+ trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL); \
+ trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL); \
+ extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL);\
+ extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL);\
+ floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL); \
+ fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL); \
+ fixunstfsi_libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL); \
+ if (TARGET_FPU) \
+ sqrt_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, "_Q_sqrt"); \
+ } \
+ INIT_SUBTARGET_OPTABS; \
} while (0)
/* This is meant to be redefined in the host dependent files */
@@ -3109,15 +3171,29 @@
offset = INTVAL (XEXP (addr, 1)), base = XEXP (addr, 0);\
else \
base = XEXP (addr, 0), index = XEXP (addr, 1); \
- fputs (reg_names[REGNO (base)], FILE); \
- if (index == 0) \
- fprintf (FILE, "%+d", offset); \
- else if (GET_CODE (index) == REG) \
- fprintf (FILE, "+%s", reg_names[REGNO (index)]); \
- else if (GET_CODE (index) == SYMBOL_REF \
- || GET_CODE (index) == CONST) \
- fputc ('+', FILE), output_addr_const (FILE, index); \
- else abort (); \
+ if (GET_CODE (base) == LO_SUM) \
+ { \
+ if (! USE_AS_OFFSETABLE_LO10 \
+ || TARGET_ARCH32 \
+ || TARGET_CM_MEDMID) \
+ abort (); \
+ output_operand (XEXP (base, 0), 0); \
+ fputs ("+%lo(", FILE); \
+ output_address (XEXP (base, 1)); \
+ fprintf (FILE, ")+%d", offset); \
+ } \
+ else \
+ { \
+ fputs (reg_names[REGNO (base)], FILE); \
+ if (index == 0) \
+ fprintf (FILE, "%+d", offset); \
+ else if (GET_CODE (index) == REG) \
+ fprintf (FILE, "+%s", reg_names[REGNO (index)]); \
+ else if (GET_CODE (index) == SYMBOL_REF \
+ || GET_CODE (index) == CONST) \
+ fputc ('+', FILE), output_addr_const (FILE, index); \
+ else abort (); \
+ } \
} \
else if (GET_CODE (addr) == MINUS \
&& GET_CODE (XEXP (addr, 1)) == LABEL_REF) \

File diff suppressed because it is too large Load diff

View file

@ -1,34 +0,0 @@
$NetBSD: patch-az,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/sparc/sysv4.h.orig 2000/07/26 00:18:52 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/sparc/sysv4.h 2000/08/11 03:31:41 1.3
@@ -210,6 +210,29 @@
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
+/* A C statement (sans semicolon) to output an element in the table of
+ global constructors. */
+#undef ASM_OUTPUT_CONSTRUCTOR
+#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
+ do { \
+ ctors_section (); \
+ fprintf (FILE, "\t%s\t ", TARGET_ARCH64 ? ASM_LONGLONG : INT_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
+/* A C statement (sans semicolon) to output an element in the table of
+ global destructors. */
+#undef ASM_OUTPUT_DESTRUCTOR
+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
+ do { \
+ dtors_section (); \
+ fprintf (FILE, "\t%s\t ", TARGET_ARCH64 ? ASM_LONGLONG : INT_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
+
/* Override the name of the mcount profiling function. */
#undef MCOUNT_FUNCTION

View file

@ -1,83 +0,0 @@
$NetBSD: patch-ba,v 1.3 2002/03/28 10:11:53 jmc Exp $
--- ../gcc-2.95.3/gcc/config/vax/netbsd.h.orig 2000/07/26 00:18:55 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/vax/netbsd.h 2002/02/11 00:02:12 1.6
@@ -1,5 +1,22 @@
+#include <vax/vax.h>
+#ifdef NETBSD_ELF
+#include <elfos.h>
+#endif
+#include <netbsd.h>
+
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Dvax -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(vax) -Amachine(vax)"
+#define CPP_PREDEFINES "-D__vax__ -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(vax) -Amachine(vax)"
+
+#undef CC1_SPEC
+#define CC1_SPEC "\
+ %{!fno-pic: \
+ %{!mno-pic: %{!fpic: %{!fPIC:-fPIC}}} \
+ %{!mindirect: %{!mno-indirect:-mno-indirect}}} \
+ %{mno-pic: -fno-pic -mindirect} \
+ %{fno-pic: \
+ %{!mindirect: %{!mno-indirect:-mindirect}}}"
+
+#define CC1PLUS_SPEC CC1_SPEC
/* Make gcc agree with <machine/ansi.h> */
@@ -21,4 +38,54 @@
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#undef DWARF2_UNWIND_INFO
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT 0
+
+/* Function CSE screws up PLT .vs. GOT usage.
+ */
+#define NO_FUNCTION_CSE
+
+/* This makes use of a hook in varasm.c to mark all external functions
+ for us. We use this to make sure that external functions are correctly
+ referenced from the PLT. */
+
+#define NO_EXTERNAL_INDIRECT_ADDRESS
+
+/* Define this macro if references to a symbol must be treated
+ differently depending on something about the variable or
+ function named by the symbol (such as what section it is in).
+
+ On the VAX, if using PIC, mark a SYMBOL_REF for a non-global
+ symbol so that we may use indirect accesses with it. */
+
+#define ENCODE_SECTION_INFO(DECL) \
+do \
+ { \
+ if (flag_pic) \
+ { \
+ rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
+ \
+ if (GET_CODE (rtl) == MEM) \
+ { \
+ SYMBOL_REF_FLAG (XEXP (rtl, 0)) \
+ = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ || ! TREE_PUBLIC (DECL)); \
+ } \
+ } \
+ } \
+while (0)
+
+/* Put relocations in the constant pool in the writable data section. */
+#undef SELECT_RTX_SECTION
+#define SELECT_RTX_SECTION(MODE,RTX) \
+{ \
+ if (flag_pic && vax_symbolic_operand ((RTX), (MODE))) \
+ data_section (); \
+ else \
+ readonly_data_section (); \
+}
+
+/* Use sjlj exceptions. */

View file

@ -1,674 +0,0 @@
$NetBSD: patch-bb,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/config/vax/vax.c.orig 2000/07/26 00:18:55 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/vax/vax.c 2002/02/23 21:02:50 1.11
@@ -19,19 +19,24 @@
Boston, MA 02111-1307, USA. */
#include "config.h"
-#include <stdio.h>
+#include "system.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "real.h"
#include "insn-config.h"
+#include "insn-codes.h"
#include "conditions.h"
#include "insn-flags.h"
+/*#include "function.h"*/
#include "output.h"
#include "insn-attr.h"
#ifdef VMS_TARGET
#include "tree.h"
#endif
+#include "reload.h"
+#include "recog.h"
+/*#include "tm_p.h"*/
/* This is like nonimmediate_operand with a restriction on the type of MEM. */
@@ -43,8 +48,9 @@
int i;
/* Split operands. */
- low[0] = low[1] = low[2] = 0;
- for (i = 0; i < 3; i++)
+ for (i = 0; i < n; i++)
+ low[i] = 0;
+ for (i = 0; i < n; i++)
{
if (low[i])
/* it's already been figured out */;
@@ -52,7 +58,7 @@
&& (GET_CODE (XEXP (operands[i], 0)) == POST_INC))
{
rtx addr = XEXP (operands[i], 0);
- operands[i] = low[i] = gen_rtx (MEM, SImode, addr);
+ operands[i] = low[i] = gen_rtx_MEM (SImode, addr);
if (which_alternative == 0 && i == 0)
{
addr = XEXP (operands[i], 0);
@@ -71,9 +77,25 @@
FILE *file;
register rtx addr;
{
- register rtx reg1, reg2, breg, ireg;
+ register rtx reg1, breg, ireg;
rtx offset;
+ rtx orig_addr = addr;
+#if 0
+ if (GET_CODE (addr) == PLUS && GET_CODE (XEXP (addr, 1)) == CONST)
+ debug_rtx (addr);
+#endif
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+ if (flag_pic && GET_CODE (addr) == CONST &&
+ GET_CODE (XEXP (addr, 0)) == PLUS &&
+ GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF &&
+ !SYMBOL_REF_FLAG (XEXP (XEXP (addr, 0), 0)) &&
+ GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT)
+ {
+ fatal_insn ("Non-PIC operand escaped:\n", addr);
+ }
+#endif
+
retry:
switch (GET_CODE (addr))
{
@@ -83,15 +105,20 @@
goto retry;
case REG:
- fprintf (file, "(%s)", reg_names[REGNO (addr)]);
+ if (REGNO (addr) >= 16)
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
+ fprintf (file, "(%s%s)", REGISTER_PREFIX, reg_names[REGNO (addr)]);
break;
case PRE_DEC:
- fprintf (file, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]);
+ fprintf (file, "-(%s%s)", REGISTER_PREFIX, reg_names[REGNO (XEXP (addr, 0))]);
break;
case POST_INC:
- fprintf (file, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]);
+ fprintf (file, "(%s%s)+", REGISTER_PREFIX, reg_names[REGNO (XEXP (addr, 0))]);
break;
case PLUS:
@@ -139,7 +166,10 @@
addr = XEXP (addr, 1);
}
else
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
if (GET_CODE (addr) == REG)
{
@@ -162,7 +192,10 @@
else if (GET_CODE (XEXP (addr, 0)) == CONST_INT)
offset = plus_constant (offset, INTVAL (XEXP (addr, 0)));
else
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
}
offset = XEXP (addr, 0);
}
@@ -176,11 +209,17 @@
else if (GET_CODE (XEXP (addr, 0)) == MULT)
{
if (ireg)
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
ireg = XEXP (addr, 0);
}
else
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
if (CONSTANT_ADDRESS_P (XEXP (addr, 1))
|| GET_CODE (XEXP (addr, 1)) == MEM)
@@ -192,7 +231,10 @@
else if (GET_CODE (XEXP (addr, 1)) == CONST_INT)
offset = plus_constant (offset, INTVAL (XEXP (addr, 1)));
else
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
}
offset = XEXP (addr, 1);
}
@@ -206,22 +248,49 @@
else if (GET_CODE (XEXP (addr, 1)) == MULT)
{
if (ireg)
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
ireg = XEXP (addr, 1);
}
+ else if (GET_CODE (addr) == SYMBOL_REF)
+ {
+ output_addr_const (file, addr);
+ if (offset != 0)
+ {
+ fputc ('+', file);
+ output_address (offset);
+ offset = 0;
+ }
+ }
else
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
}
else
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
/* If REG1 is non-zero, figure out if it is a base or index register. */
if (reg1)
{
- if (breg != 0 || (offset && GET_CODE (offset) == MEM))
+ if (breg != 0
+ || GET_CODE (addr) == SYMBOL_REF
+ || (offset
+ && (GET_CODE (offset) == MEM
+ || GET_CODE (offset) == SYMBOL_REF
+ || GET_CODE (offset) == CONST)))
{
if (ireg)
- abort ();
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
ireg = reg1;
}
else
@@ -232,15 +301,25 @@
output_address (offset);
if (breg != 0)
- fprintf (file, "(%s)", reg_names[REGNO (breg)]);
+ {
+ if (REGNO (breg) >= 16)
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
+ fprintf (file, "(%s%s)", REGISTER_PREFIX, reg_names[REGNO (breg)]);
+ }
if (ireg != 0)
{
if (GET_CODE (ireg) == MULT)
ireg = XEXP (ireg, 0);
if (GET_CODE (ireg) != REG)
- abort ();
- fprintf (file, "[%s]", reg_names[REGNO (ireg)]);
+ {
+ debug_rtx (orig_addr);
+ abort ();
+ }
+ fprintf (file, "[%s%s]", REGISTER_PREFIX, reg_names[REGNO (ireg)]);
}
break;
@@ -249,7 +328,7 @@
}
}
-char *
+const char *
rev_cond_name (op)
rtx op;
{
@@ -286,8 +365,10 @@
register rtx c;
{
register enum machine_mode mode;
+#if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT
int i;
union {double d; int i[2];} val;
+#endif
if (GET_CODE (c) != CONST_DOUBLE)
return 0;
@@ -323,7 +404,8 @@
2 - indirect */
-int vax_address_cost(addr)
+int
+vax_address_cost (addr)
register rtx addr;
{
int reg = 0, indexed = 0, indir = 0, offset = 0, predec = 0;
@@ -365,6 +447,8 @@
indir = 2; /* 3 on VAX 2 */
addr = XEXP (addr, 0);
goto restart;
+ default:
+ break;
}
/* Up to 3 things can be added in an address. They are stored in
@@ -402,7 +486,7 @@
enum machine_mode mode = GET_MODE (x);
register int c;
int i = 0; /* may be modified in switch */
- char *fmt = GET_RTX_FORMAT (code); /* may be modified in switch */
+ const char *fmt = GET_RTX_FORMAT (code); /* may be modified in switch */
switch (code)
{
@@ -427,6 +511,8 @@
case QImode:
c = 10; /* 3-4 on VAX 9000, 20-28 on VAX 2 */
break;
+ default:
+ break;
}
break;
case UDIV:
@@ -582,7 +668,7 @@
/* Check a `double' value for validity for a particular machine mode. */
-static char *float_strings[] =
+static const char *const float_strings[] =
{
"1.70141173319264430e+38", /* 2^127 (2^24 - 1) / 2^24 */
"-1.70141173319264430e+38",
@@ -621,7 +707,7 @@
if ((mode) == SFmode)
{
REAL_VALUE_TYPE r;
- bcopy ((char *) d, (char *) &r, sizeof (REAL_VALUE_TYPE));
+ memcpy (&r, d, sizeof (REAL_VALUE_TYPE));
if (REAL_VALUES_LESS (float_values[0], r))
{
bcopy ((char *) &float_values[0], (char *) d,
@@ -651,6 +737,338 @@
return 0;
}
+/* Nonzero if X is a hard reg that can be used as an index. */
+#define XREG_OK_FOR_INDEX_P(X, STRICT) (!(STRICT) || REGNO_OK_FOR_INDEX_P (REGNO (X)))
+/* Nonzero if X is a hard reg that can be used as a base reg. */
+#define XREG_OK_FOR_BASE_P(X, STRICT) (!(STRICT) || REGNO_OK_FOR_BASE_P (REGNO (X)))
+
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+
+/* Re-definition of CONSTANT_ADDRESS_P, which is true only when there
+ are no SYMBOL_REFs for external symbols present and allow valid
+ addressing modes. */
+
+#define INDIRECTABLE_CONSTANT_ADDRESS_P(X, INDEXED, INDIRECT) \
+ (GET_CODE (X) == LABEL_REF \
+ || (!INDEXED && GET_CODE (X) == SYMBOL_REF \
+ && (!INDIRECT || SYMBOL_REF_FLAG (X))) \
+ || (!INDEXED && GET_CODE (X) == CONST \
+ && GET_CODE (XEXP ((X), 0)) == PLUS \
+ && GET_CODE (XEXP (XEXP ((X), 0), 0)) == SYMBOL_REF \
+ && ((!INDIRECT && !flag_pic) \
+ || SYMBOL_REF_FLAG (XEXP (XEXP ((X), 0), 0)))) \
+ || GET_CODE (X) == CONST_INT)
+
+/* Non-zero if X is an address which can be indirected. External symbols
+ could be in a sharable image library, so we disallow those. */
+
+#define INDIRECTABLE_ADDRESS_P(X, STRICT, INDEXED, INDIRECT) \
+ (INDIRECTABLE_CONSTANT_ADDRESS_P (X, INDEXED, INDIRECT) \
+ || (GET_CODE (X) == REG && XREG_OK_FOR_BASE_P (X, STRICT)) \
+ || (GET_CODE (X) == PLUS \
+ && GET_CODE (XEXP (X, 0)) == REG \
+ && XREG_OK_FOR_BASE_P (XEXP (X, 0), STRICT) \
+ && GET_CODE (XEXP (X, 1)) != SYMBOL_REF \
+ && !(GET_CODE (XEXP (X, 1)) == CONST \
+ && GET_CODE (XEXP (XEXP (X, 1), 0)) == PLUS \
+ && GET_CODE (XEXP (XEXP (XEXP (X, 1), 0), 0)) == SYMBOL_REF) \
+ && INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 1), INDEXED, INDIRECT)))
+
+#else /* not NO_EXTERNAL_INDIRECT_ADDRESS */
+
+#define INDIRECTABLE_CONSTANT_ADDRESS_P(X, INDEXED, INDIRECT) \
+ CONSTANT_ADDRESS_P (X)
+
+/* Non-zero if X is an address which can be indirected. */
+#define INDIRECTABLE_ADDRESS_P(X, STRICT, INDEXED, INDIRECT) \
+ (INDIRECTABLE_CONSTANT_ADDRESS_P (X, INDEXED, INDIRECT) \
+ || (GET_CODE (X) == REG && XREG_OK_FOR_BASE_P (X, STRICT)) \
+ || (GET_CODE (X) == PLUS \
+ && GET_CODE (XEXP (X, 0)) == REG \
+ && XREG_OK_FOR_BASE_P (XEXP (X, 0), STRICT) \
+ && CONSTANT_ADDRESS_P (XEXP (X, 1))))
+
+#endif /* not NO_EXTERNAL_INDIRECT_ADDRESS */
+
+/* Go to ADDR if X is a valid address not using indexing.
+ (This much is the easy part.) */
+#define GO_IF_NONINDEXED_ADDRESS(X, ADDR, STRICT, INDEXED) \
+{ register rtx xfoob = (X); \
+ if (GET_CODE (X) == REG) \
+ { \
+ extern rtx *reg_equiv_mem; \
+ if (! reload_in_progress) \
+ goto ADDR; \
+ if (!STRICT) \
+ { \
+ if ((xfoob = reg_equiv_mem[REGNO (xfoob)]) == 0) \
+ goto ADDR; \
+ } \
+ if (INDIRECTABLE_ADDRESS_P (xfoob, STRICT, INDEXED, 0)) \
+ goto ADDR; \
+ } \
+ if (INDIRECTABLE_CONSTANT_ADDRESS_P (X, INDEXED, 0)) goto ADDR; \
+ if (INDIRECTABLE_ADDRESS_P (X, STRICT, INDEXED, 0)) goto ADDR; \
+ xfoob = XEXP (X, 0); \
+ if (GET_CODE (X) == MEM \
+ && INDIRECTABLE_ADDRESS_P (xfoob, STRICT, INDEXED, !TARGET_INDIRECT)) \
+ goto ADDR; \
+ if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_INC) \
+ && GET_CODE (xfoob) == REG \
+ && XREG_OK_FOR_BASE_P (xfoob, STRICT)) \
+ goto ADDR; }
+
+/* 1 if PROD is either a reg times size of mode MODE
+ or just a reg, if MODE is just one byte.
+ This macro's expansion uses the temporary variables xfoo0 and xfoo1
+ that must be declared in the surrounding context. */
+#define INDEX_TERM_P(PROD, MODE, STRICT) \
+(GET_MODE_SIZE (MODE) == 1 \
+ ? (GET_CODE (PROD) == REG && XREG_OK_FOR_BASE_P (PROD, STRICT)) \
+ : (GET_CODE (PROD) == MULT \
+ && \
+ (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1), \
+ ((GET_CODE (xfoo0) == CONST_INT \
+ && GET_CODE (xfoo1) == REG \
+ && INTVAL (xfoo0) == (int)GET_MODE_SIZE (MODE) \
+ && XREG_OK_FOR_INDEX_P (xfoo1, STRICT)) \
+ || \
+ (GET_CODE (xfoo1) == CONST_INT \
+ && GET_CODE (xfoo0) == REG \
+ && INTVAL (xfoo1) == (int)GET_MODE_SIZE (MODE) \
+ && XREG_OK_FOR_INDEX_P (xfoo0, STRICT))))))
+
+/* Go to ADDR if X is the sum of a register
+ and a valid index term for mode MODE. */
+#define GO_IF_REG_PLUS_INDEX(X, MODE, ADDR, STRICT) \
+{ register rtx xfooa; \
+ if (GET_CODE (X) == PLUS) \
+ { if (GET_CODE (XEXP (X, 0)) == REG \
+ && XREG_OK_FOR_BASE_P (XEXP (X, 0), STRICT) \
+ && (xfooa = XEXP (X, 1), \
+ INDEX_TERM_P (xfooa, MODE, STRICT))) \
+ goto ADDR; \
+ if (GET_CODE (XEXP (X, 1)) == REG \
+ && XREG_OK_FOR_BASE_P (XEXP (X, 1), STRICT) \
+ && (xfooa = XEXP (X, 0), \
+ INDEX_TERM_P (xfooa, MODE, STRICT))) \
+ goto ADDR; } }
+
+int
+legitimate_pic_operand_p(x, strict)
+ register rtx x;
+ int strict ATTRIBUTE_UNUSED;
+{
+ if (GET_CODE (x) != SYMBOL_REF
+ && !(GET_CODE (x) == CONST
+ && GET_CODE (XEXP (x, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF))
+ {
+ return 1;
+ }
+ return 0;
+}
+
+int
+legitimate_address_p(mode, xbar, strict)
+ enum machine_mode mode;
+ register rtx xbar;
+ int strict;
+{
+ register rtx xfoo, xfoo0, xfoo1;
+ int from = __LINE__;
+ GO_IF_NONINDEXED_ADDRESS (xbar, win, strict, 0);
+ if (GET_CODE (xbar) == PLUS)
+ {
+ /* Handle <address>[index] represented with index-sum outermost */
+ xfoo = XEXP (xbar, 0);
+ if (INDEX_TERM_P (xfoo, mode, strict))
+ {
+ from = __LINE__;
+ GO_IF_NONINDEXED_ADDRESS (XEXP (xbar, 1), win, strict, 0);
+ }
+ xfoo = XEXP (xbar, 1);
+ if (INDEX_TERM_P (xfoo, mode, strict))
+ {
+ from = __LINE__;
+ GO_IF_NONINDEXED_ADDRESS (XEXP (xbar, 0), win, strict, 0);
+ }
+ /* Handle offset(reg)[index] with offset added outermost */
+ if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (xbar, 0), 1, 0))
+ {
+ from = __LINE__;
+ if (GET_CODE (XEXP (xbar, 1)) == REG
+ && XREG_OK_FOR_BASE_P (XEXP (xbar, 1), strict))
+ goto win;
+ from = __LINE__;
+ GO_IF_REG_PLUS_INDEX (XEXP (xbar, 1), mode, win, strict);
+ }
+ if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (xbar, 1), 1, 0))
+ {
+ from = __LINE__;
+ if (GET_CODE (XEXP (xbar, 0)) == REG
+ && XREG_OK_FOR_BASE_P (XEXP (xbar, 0), strict))
+ goto win;
+ from = __LINE__;
+ GO_IF_REG_PLUS_INDEX (XEXP (xbar, 0), mode, win, strict);
+ }
+ }
+ return 0;
+
+ win:
+#if 0
+ if (strict)
+ {
+ fprintf(stderr, "line=%d\n", from);
+ debug_rtx (xbar);
+ }
+#endif
+ if (flag_pic && GET_CODE (xbar) == SYMBOL_REF
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+ && !SYMBOL_REF_FLAG (xbar)
+#endif
+ && mode == DImode)
+ return 0;
+ return 1;
+}
+
+int
+vax_symbolic_operand (op, mode)
+ register rtx op;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+ if (!general_operand(op, mode))
+ return 0;
+ if (GET_CODE (op) == SYMBOL_REF
+ || GET_CODE (op) == LABEL_REF
+ || (GET_CODE (op) == CONST
+ && GET_CODE (XEXP (op, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+ && (SYMBOL_REF_FLAG (XEXP (XEXP (op, 0), 0)) || !flag_pic)
+#endif
+ && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
+ || (GET_CODE (op) == PLUS
+ && GET_CODE (XEXP (op, 1)) == SYMBOL_REF
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+ && (SYMBOL_REF_FLAG (XEXP (op, 1)) || !flag_pic)
+#endif
+ && GET_CODE (XEXP (op, 0)) == CONST_INT)
+ || (GET_CODE (op) == PLUS
+ && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+ && (SYMBOL_REF_FLAG (XEXP (op, 0)) || !flag_pic)
+#endif
+ && GET_CODE (XEXP (op, 1)) == CONST_INT))
+ {
+ return 1;
+ }
+ return 0;
+}
+
+int
+vax_nonsymbolic_operand (op, mode)
+ register rtx op;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+ if (!general_operand(op, mode))
+ return 0;
+ if (GET_CODE (op) == SYMBOL_REF
+ || GET_CODE (op) == LABEL_REF
+ || (GET_CODE (op) == CONST
+ && GET_CODE (XEXP (op, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF)
+ || (GET_CODE (op) == MEM
+ && GET_CODE (XEXP (op, 0)) == CONST
+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (XEXP (op, 0), 0), 0)) == SYMBOL_REF)
+ || (GET_CODE (op) == PLUS
+ && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+ && GET_CODE (XEXP (op, 1)) == CONST_INT))
+ return 0;
+#if 0
+ if (GET_CODE (op) == PLUS)
+ debug_rtx (op);
+#endif
+ if (vax_symbolic_operand (op, mode))
+ return 0;
+#if 0
+ if (GET_CODE (op) != CONST_INT && GET_CODE (op) != REG &&
+ GET_CODE (op) != MEM)
+ debug_rtx (op);
+#endif
+ return 1;
+}
+
+int
+vax_lvalue_operand(op, mode)
+ register rtx op;
+ enum machine_mode mode;
+{
+ if (!general_operand(op, mode))
+ return 0;
+ return GET_CODE (op) == REG
+ || GET_CODE (op) == SUBREG
+ || GET_CODE (op) == MEM
+ || GET_CODE (op) == CONCAT
+ || GET_CODE (op) == PARALLEL
+ || GET_CODE (op) == STRICT_LOW_PART;
+}
+
+int
+vax_general_operand(op, mode)
+ register rtx op;
+ enum machine_mode mode;
+{
+ if (!general_operand(op, mode))
+ return 0;
+ if (!flag_pic)
+ return 1;
+ if ((GET_CODE (op) == CONST
+ && GET_CODE (XEXP (op, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+ && !SYMBOL_REF_FLAG (XEXP (XEXP (op, 0), 0))
+#endif
+ ) || (GET_CODE (op) == MEM
+ && GET_CODE (XEXP (op, 0)) == CONST
+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (XEXP (op, 0), 0), 0)) == SYMBOL_REF
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+ && !SYMBOL_REF_FLAG (XEXP (XEXP (op, 0), 0))
+#endif
+ ) || (GET_CODE (op) == PLUS
+ && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+ && GET_CODE (XEXP (op, 1)) == CONST_INT
+#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
+ && !SYMBOL_REF_FLAG (XEXP (op, 0))
+#endif
+ ))
+ return 0;
+#if 0
+ debug_rtx (op);
+#endif
+ return 1;
+}
+
+int
+vax_reg_used_p(operand, reg)
+ rtx operand;
+ int reg;
+{
+ if (GET_CODE (operand) == REG && REGNO (operand) == reg)
+ return 1;
+ if (GET_CODE (operand) == MEM ||
+ GET_CODE (operand) == PRE_DEC ||
+ GET_CODE (operand) == POST_DEC)
+ return vax_reg_used_p (XEXP(operand, 0), reg);
+ if (GET_CODE (operand) == PLUS ||
+ GET_CODE (operand) == MULT)
+ return vax_reg_used_p (XEXP(operand, 0), reg) ||
+ vax_reg_used_p (XEXP(operand, 1), reg);
+ return 0;
+}
+
#ifdef VMS_TARGET
/* Additional support code for VMS target. */
@@ -661,7 +1079,7 @@
static
struct extern_list {
struct extern_list *next; /* next external */
- char *name; /* name of the external */
+ const char *name; /* name of the external */
int size; /* external's actual size */
int in_const; /* section type flag */
} *extern_head = 0, *pending_head = 0;
@@ -672,7 +1090,7 @@
void
vms_check_external (decl, name, pending)
tree decl;
- char *name;
+ const char *name;
int pending;
{
register struct extern_list *p, *p0;

View file

@ -1,568 +0,0 @@
$NetBSD: patch-bc,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/config/vax/vax.h.orig 2000/07/26 00:18:55 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/vax/vax.h 2002/02/25 17:33:02 1.14
@@ -25,7 +25,7 @@
/* If using g-format floating point, alter math.h. */
-#define CPP_SPEC "%{mg:-DGFLOAT}"
+#define CPP_SPEC "%{mg:%{!ansi:-DGFLOAT} -D__GFLOAT}"
/* Choose proper libraries depending on float format.
Note that there are no profiling libraries for g-format.
@@ -51,14 +51,21 @@
/* Macros used in the machine description to test the flags. */
/* Nonzero if compiling code that Unix assembler can assemble. */
-#define TARGET_UNIX_ASM (target_flags & 1)
+#define MASK_UNIX_ASM 1
+#define TARGET_UNIX_ASM (target_flags & MASK_UNIX_ASM)
/* Nonzero if compiling with VAX-11 "C" style structure alignment */
-#define TARGET_VAXC_ALIGNMENT (target_flags & 2)
+#define MASK_VAXC_ALIGNMENT 2
+#define TARGET_VAXC_ALIGNMENT (target_flags & MASK_VAXC_ALIGNMENT)
/* Nonzero if compiling with `G'-format floating point */
-#define TARGET_G_FLOAT (target_flags & 4)
+#define MASK_G_FLOAT 4
+#define TARGET_G_FLOAT (target_flags & MASK_G_FLOAT)
+/* Nonzero if compiling for PIC code */
+#define MASK_INDIRECT 8
+#define TARGET_INDIRECT (target_flags & MASK_INDIRECT)
+
/* Macro to define tables used to set the flags.
This is a list in braces of pairs in braces,
each pair being { "NAME", VALUE }
@@ -66,26 +73,28 @@
An empty string NAME is used to identify the default VALUE. */
#define TARGET_SWITCHES \
- { {"unix", 1}, \
- {"gnu", -1}, \
- {"vaxc-alignment", 2}, \
- {"g", 4}, \
- {"g-float", 4}, \
- {"d", -4}, \
- {"d-float", -4}, \
- { "", TARGET_DEFAULT}}
+ { {"unix", MASK_UNIX_ASM, "Generate code for UNIX assembler"}, \
+ {"gnu", -MASK_UNIX_ASM, "Generate code for GNU assembler (gas)"}, \
+ {"vaxc-alignment", MASK_VAXC_ALIGNMENT, "Use VAXC structure conventions"}, \
+ {"g", MASK_G_FLOAT, "Generate GFLOAT double precision code"}, \
+ {"g-float", MASK_G_FLOAT, "Generate GFLOAT double precision code"}, \
+ {"d", -MASK_G_FLOAT, "Generate DFLOAT double precision code"}, \
+ {"d-float", -MASK_G_FLOAT, "Generate DFLOAT double precision code"}, \
+ {"indirect", MASK_INDIRECT, "Allow indirect memory references in PIC code"}, \
+ {"no-indirect", -MASK_INDIRECT, "Disallow indirect memory references in PIC code"}, \
+ { "", TARGET_DEFAULT, 0}}
/* Default target_flags if no switches specified. */
#ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT 1
+#define TARGET_DEFAULT MASK_UNIX_ASM
#endif
/* Target machine storage layout */
/* Define for software floating point emulation of VAX format
when cross compiling from a non-VAX host. */
-/* #define REAL_ARITHMETIC */
+#define REAL_ARITHMETIC
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields.
@@ -258,7 +267,7 @@
This is an initializer for a vector of HARD_REG_SET
of length N_REG_CLASSES. */
-#define REG_CLASS_CONTENTS {0, 0xffff}
+#define REG_CLASS_CONTENTS {{0}, {0xffff}}
/* The same information, inverted:
Return the class number of the smallest class containing
@@ -276,16 +285,28 @@
#define REG_CLASS_FROM_LETTER(C) NO_REGS
-/* The letters I, J, K, L and M in a register constraint string
+/* The letters I, J, K, L, M, N, and O in a register constraint string
can be used to stand for particular ranges of immediate operands.
This macro defines what the ranges are.
C is the letter, and VALUE is a constant value.
Return 1 if VALUE is in the range specified by C.
-
- `I' is the constant zero. */
-#define CONST_OK_FOR_LETTER_P(VALUE, C) \
- ((C) == 'I' ? (VALUE) == 0 \
+ `I' is the constant zero.
+ `J' is a value between 0 .. 63 (inclusive) S^#
+ `K' is a value between -128 and 127 (inclusive) B^
+ 'L' is a value between -32768 and 32767 (include) W^
+ `M' is a value between 0 and 255 (inclusive) B^
+ 'N' is a value between 0 and 65535 (inclusive) W^
+ `O' is a value between -63 and -1 (inclusive) */
+
+#define CONST_OK_FOR_LETTER_P(VALUE, C) \
+ ( (C) == 'I' ? (VALUE) == 0 \
+ : (C) == 'J' ? 0 <= (VALUE) && (VALUE) < 64 \
+ : (C) == 'O' ? -63 <= (VALUE) && (VALUE) < 0 \
+ : (C) == 'K' ? -128 <= (VALUE) && (VALUE) < 128 \
+ : (C) == 'M' ? 0 <= (VALUE) && (VALUE) < 256 \
+ : (C) == 'L' ? -32768 <= (VALUE) && (VALUE) < 32768 \
+ : (C) == 'N' ? 0 <= (VALUE) && (VALUE) < 65536 \
: 0)
/* Similar, but for floating constants, and defining letters G and H.
@@ -347,8 +368,7 @@
/* Given an rtx for the address of a frame,
return an rtx for the address of the word in the frame
that holds the dynamic chain--the previous frame's address. */
-#define DYNAMIC_CHAIN_ADDRESS(frame) \
-gen_rtx (PLUS, Pmode, frame, GEN_INT (12))
+#define DYNAMIC_CHAIN_ADDRESS(FRAME) plus_constant ((FRAME), 12)
/* If we generate an insn to push BYTES bytes,
this says how many the stack pointer really advances by.
@@ -377,14 +397,14 @@
/* On the Vax the return value is in R0 regardless. */
#define FUNCTION_VALUE(VALTYPE, FUNC) \
- gen_rtx (REG, TYPE_MODE (VALTYPE), 0)
+ gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
/* Define how to find the value returned by a library function
assuming the value has mode MODE. */
/* On the Vax the return value is in R0 regardless. */
-#define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, 0)
+#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 0)
/* Define this if PCC uses the nonreentrant convention for returning
structure and union values. */
@@ -466,8 +486,12 @@
mask |= 1 << regno; \
fprintf (FILE, "\t.word 0x%x\n", mask); \
MAYBE_VMS_FUNCTION_PROLOGUE(FILE) \
- if ((size) >= 64) fprintf (FILE, "\tmovab %d(sp),sp\n", -size);\
- else if (size) fprintf (FILE, "\tsubl2 $%d,sp\n", (size)); }
+ if ((size) >= 64) \
+ fprintf (FILE, "\tmovab %d(%ssp),%ssp\n", -size, \
+ REGISTER_PREFIX, REGISTER_PREFIX); \
+ else if (size) \
+ fprintf (FILE, "\tsubl2 $%d,%ssp\n", \
+ (size), REGISTER_PREFIX); }
/* vms.h redefines this. */
#define MAYBE_VMS_FUNCTION_PROLOGUE(FILE)
@@ -495,8 +519,9 @@
*/
#define BLOCK_PROFILER(FILE, BLOCKNO) \
- fprintf (FILE, "\tmovpsl -(sp)\n\tmovw (sp),2(sp)\n\taddl2 $2,sp\n\taddl2 $1,LPBX2+%d\n\tbicpsw $255\n\tbispsw (sp)+\n", \
- 4 * BLOCKNO)
+ fprintf (FILE, "\tmovpsl -(%ssp)\n\tmovw (%ssp),2(%ssp)\n\taddl2 $2,%ssp\n\taddl2 $1,LPBX2+%d\n\tbicpsw $255\n\tbispsw (%ssp)+\n", \
+ 4 * BLOCKNO, REGISTER_PREFIX, REGISTER_PREFIX, REGISTER_PREFIX, \
+ REGISTER_PREFIX, REGISTER_PREFIX)
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
the stack pointer does not matter. The value is tested only in
@@ -533,10 +558,10 @@
#define TRAMPOLINE_TEMPLATE(FILE) \
{ \
ASM_OUTPUT_SHORT (FILE, const0_rtx); \
- ASM_OUTPUT_SHORT (FILE, GEN_INT (0x8fd0)); \
+ ASM_OUTPUT_SHORT (FILE, GEN_INT (0x8fd0)); \
ASM_OUTPUT_INT (FILE, const0_rtx); \
- ASM_OUTPUT_BYTE (FILE, 0x50+STATIC_CHAIN_REGNUM); \
- ASM_OUTPUT_SHORT (FILE, GEN_INT (0x9f17)); \
+ ASM_OUTPUT_BYTE (FILE, 0x50 + STATIC_CHAIN_REGNUM); \
+ ASM_OUTPUT_SHORT (FILE, GEN_INT (0x9f17)); \
ASM_OUTPUT_INT (FILE, const0_rtx); \
}
@@ -548,16 +573,20 @@
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. */
+/* This is separated out so register prefixes can be added by a target
+ if it requires them */
+#define VAX_ISTREAM_SYNC "movpsl -(sp)\n\tpushal 1(pc)\n\trei"
+
/* We copy the register-mask from the function's pure code
to the start of the trampoline. */
+
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
{ \
- emit_insn (gen_rtx (ASM_INPUT, VOIDmode, \
- "movpsl -(sp)\n\tpushal 1(pc)\n\trei")); \
- emit_move_insn (gen_rtx (MEM, HImode, TRAMP), \
- gen_rtx (MEM, HImode, FNADDR)); \
- emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 4)), CXT);\
- emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 11)), \
+ emit_insn (gen_rtx_ASM_INPUT (VOIDmode, VAX_ISTREAM_SYNC)); \
+ emit_move_insn (gen_rtx_MEM (HImode, TRAMP), \
+ gen_rtx_MEM (HImode, FNADDR)); \
+ emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 4)), CXT);\
+ emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 11)), \
plus_constant (FNADDR, 2)); \
}
@@ -573,7 +602,7 @@
#define RETURN_ADDR_RTX(COUNT, FRAME) \
((COUNT == 0) \
- ? gen_rtx (MEM, Pmode, plus_constant (FRAME, RETURN_ADDRESS_OFFSET)) \
+ ? gen_rtx_MEM (Pmode, plus_constant (FRAME, RETURN_ADDRESS_OFFSET)) \
: (rtx) 0)
@@ -635,6 +664,9 @@
/* Nonzero if X is a hard reg that can be used as a base reg
or if it is a pseudo reg. */
#define REG_OK_FOR_BASE_P(X) 1
+#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X, 0)
+#define GO_IF_LEGITIMATE_ADDRESS(ZMODE, XOP, LABEL) \
+ do { if (legitimate_address_p(ZMODE, XOP, 0)) goto LABEL; } while (0)
#else
@@ -642,144 +674,12 @@
#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
/* Nonzero if X is a hard reg that can be used as a base reg. */
#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
+#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X, 1)
+#define GO_IF_LEGITIMATE_ADDRESS(ZMODE, XOP, LABEL) \
+ do { if (legitimate_address_p(ZMODE, XOP, 1)) goto LABEL; } while (0)
#endif
-/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
- that is a valid memory address for an instruction.
- The MODE argument is the machine mode for the MEM expression
- that wants to use this address.
-
- The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS,
- except for CONSTANT_ADDRESS_P which is actually machine-independent. */
-
-#ifdef NO_EXTERNAL_INDIRECT_ADDRESS
-
-/* Zero if this contains a (CONST (PLUS (SYMBOL_REF) (...))) and the
- symbol in the SYMBOL_REF is an external symbol. */
-
-#define INDIRECTABLE_CONSTANT_P(X) \
- (! (GET_CODE ((X)) == CONST \
- && GET_CODE (XEXP ((X), 0)) == PLUS \
- && GET_CODE (XEXP (XEXP ((X), 0), 0)) == SYMBOL_REF \
- && SYMBOL_REF_FLAG (XEXP (XEXP ((X), 0), 0))))
-
-/* Re-definition of CONSTANT_ADDRESS_P, which is true only when there
- are no SYMBOL_REFs for external symbols present. */
-
-#define INDIRECTABLE_CONSTANT_ADDRESS_P(X) \
- (GET_CODE (X) == LABEL_REF \
- || (GET_CODE (X) == SYMBOL_REF && !SYMBOL_REF_FLAG (X)) \
- || (GET_CODE (X) == CONST && INDIRECTABLE_CONSTANT_P(X)) \
- || GET_CODE (X) == CONST_INT)
-
-
-/* Non-zero if X is an address which can be indirected. External symbols
- could be in a sharable image library, so we disallow those. */
-
-#define INDIRECTABLE_ADDRESS_P(X) \
- (INDIRECTABLE_CONSTANT_ADDRESS_P (X) \
- || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \
- || (GET_CODE (X) == PLUS \
- && GET_CODE (XEXP (X, 0)) == REG \
- && REG_OK_FOR_BASE_P (XEXP (X, 0)) \
- && INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 1))))
-
-#else /* not NO_EXTERNAL_INDIRECT_ADDRESS */
-
-#define INDIRECTABLE_CONSTANT_ADDRESS_P(X) CONSTANT_ADDRESS_P(X)
-
-/* Non-zero if X is an address which can be indirected. */
-#define INDIRECTABLE_ADDRESS_P(X) \
- (CONSTANT_ADDRESS_P (X) \
- || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \
- || (GET_CODE (X) == PLUS \
- && GET_CODE (XEXP (X, 0)) == REG \
- && REG_OK_FOR_BASE_P (XEXP (X, 0)) \
- && CONSTANT_ADDRESS_P (XEXP (X, 1))))
-
-#endif /* not NO_EXTERNAL_INDIRECT_ADDRESS */
-
-/* Go to ADDR if X is a valid address not using indexing.
- (This much is the easy part.) */
-#define GO_IF_NONINDEXED_ADDRESS(X, ADDR) \
-{ register rtx xfoob = (X); \
- if (GET_CODE (xfoob) == REG) \
- { \
- extern rtx *reg_equiv_mem; \
- if (! reload_in_progress \
- || reg_equiv_mem[REGNO (xfoob)] == 0 \
- || INDIRECTABLE_ADDRESS_P (reg_equiv_mem[REGNO (xfoob)])) \
- goto ADDR; \
- } \
- if (CONSTANT_ADDRESS_P (xfoob)) goto ADDR; \
- if (INDIRECTABLE_ADDRESS_P (xfoob)) goto ADDR; \
- xfoob = XEXP (X, 0); \
- if (GET_CODE (X) == MEM && INDIRECTABLE_ADDRESS_P (xfoob)) \
- goto ADDR; \
- if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_INC) \
- && GET_CODE (xfoob) == REG && REG_OK_FOR_BASE_P (xfoob)) \
- goto ADDR; }
-
-/* 1 if PROD is either a reg times size of mode MODE
- or just a reg, if MODE is just one byte.
- This macro's expansion uses the temporary variables xfoo0 and xfoo1
- that must be declared in the surrounding context. */
-#define INDEX_TERM_P(PROD, MODE) \
-(GET_MODE_SIZE (MODE) == 1 \
- ? (GET_CODE (PROD) == REG && REG_OK_FOR_BASE_P (PROD)) \
- : (GET_CODE (PROD) == MULT \
- && \
- (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1), \
- ((GET_CODE (xfoo0) == CONST_INT \
- && INTVAL (xfoo0) == GET_MODE_SIZE (MODE) \
- && GET_CODE (xfoo1) == REG \
- && REG_OK_FOR_INDEX_P (xfoo1)) \
- || \
- (GET_CODE (xfoo1) == CONST_INT \
- && INTVAL (xfoo1) == GET_MODE_SIZE (MODE) \
- && GET_CODE (xfoo0) == REG \
- && REG_OK_FOR_INDEX_P (xfoo0))))))
-
-/* Go to ADDR if X is the sum of a register
- and a valid index term for mode MODE. */
-#define GO_IF_REG_PLUS_INDEX(X, MODE, ADDR) \
-{ register rtx xfooa; \
- if (GET_CODE (X) == PLUS) \
- { if (GET_CODE (XEXP (X, 0)) == REG \
- && REG_OK_FOR_BASE_P (XEXP (X, 0)) \
- && (xfooa = XEXP (X, 1), \
- INDEX_TERM_P (xfooa, MODE))) \
- goto ADDR; \
- if (GET_CODE (XEXP (X, 1)) == REG \
- && REG_OK_FOR_BASE_P (XEXP (X, 1)) \
- && (xfooa = XEXP (X, 0), \
- INDEX_TERM_P (xfooa, MODE))) \
- goto ADDR; } }
-
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
-{ register rtx xfoo, xfoo0, xfoo1; \
- GO_IF_NONINDEXED_ADDRESS (X, ADDR); \
- if (GET_CODE (X) == PLUS) \
- { /* Handle <address>[index] represented with index-sum outermost */\
- xfoo = XEXP (X, 0); \
- if (INDEX_TERM_P (xfoo, MODE)) \
- { GO_IF_NONINDEXED_ADDRESS (XEXP (X, 1), ADDR); } \
- xfoo = XEXP (X, 1); \
- if (INDEX_TERM_P (xfoo, MODE)) \
- { GO_IF_NONINDEXED_ADDRESS (XEXP (X, 0), ADDR); } \
- /* Handle offset(reg)[index] with offset added outermost */ \
- if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 0))) \
- { if (GET_CODE (XEXP (X, 1)) == REG \
- && REG_OK_FOR_BASE_P (XEXP (X, 1))) \
- goto ADDR; \
- GO_IF_REG_PLUS_INDEX (XEXP (X, 1), MODE, ADDR); } \
- if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 1))) \
- { if (GET_CODE (XEXP (X, 0)) == REG \
- && REG_OK_FOR_BASE_P (XEXP (X, 0))) \
- goto ADDR; \
- GO_IF_REG_PLUS_INDEX (XEXP (X, 0), MODE, ADDR); } } }
-
/* Try machine-dependent ways of modifying an illegitimate address
to be legitimate. If we find one, return the new, valid address.
This macro is used in only one place: `memory_address' in explow.c.
@@ -808,8 +708,10 @@
goto LABEL; \
if (GET_CODE (ADDR) == PLUS) \
{ if (CONSTANT_ADDRESS_P (XEXP (ADDR, 0)) \
+ && (!flag_pic || GET_CODE (XEXP (ADDR, 0)) != SYMBOL_REF) \
&& GET_CODE (XEXP (ADDR, 1)) == REG); \
else if (CONSTANT_ADDRESS_P (XEXP (ADDR, 1)) \
+ && (!flag_pic || GET_CODE (XEXP (ADDR, 1)) != SYMBOL_REF) \
&& GET_CODE (XEXP (ADDR, 0)) == REG); \
else goto LABEL; }}
@@ -828,6 +730,10 @@
jumps to the default label instead. */
#define CASE_DROPS_THROUGH
+/* Indicate that jump tables go in the text section. This is
+ necessary when compiling PIC code. */
+#define JUMP_TABLES_IN_TEXT_SECTION 1
+
/* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
@@ -961,6 +867,36 @@
#define MIN_G_FLOAT .556268464626800e-308
*/
+/* Optionally define this if you have added predicates to
+ `MACHINE.c'. This macro is called within an initializer of an
+ array of structures. The first field in the structure is the
+ name of a predicate and the second field is an array of rtl
+ codes. For each predicate, list all rtl codes that can be in
+ expressions matched by the predicate. The list should have a
+ trailing comma. Here is an example of two entries in the list
+ for a typical RISC machine:
+
+ #define PREDICATE_CODES \
+ {"gen_reg_rtx_operand", {SUBREG, REG}}, \
+ {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}},
+
+ Defining this macro does not affect the generated code (however,
+ incorrect definitions that omit an rtl code that may be matched
+ by the predicate can cause the compiler to malfunction).
+ Instead, it allows the table built by `genrecog' to be more
+ compact and efficient, thus speeding up the compiler. The most
+ important predicates to include in the list specified by this
+ macro are thoses used in the most insn patterns. */
+
+#define PREDICATE_CODES \
+ {"vax_symbolic_operand", { SYMBOL_REF, LABEL_REF, CONST, PLUS }},\
+ {"vax_lvalue_operand", { REG, SUBREG, MEM, CONCAT, PARALLEL, \
+ STRICT_LOW_PART }}, \
+ {"vax_nonsymbolic_operand", { CONST_INT, CONST_DOUBLE, SUBREG, REG, \
+ MEM }}, \
+ {"vax_general_operand", { CONST_INT, CONST_DOUBLE, SUBREG, REG, \
+ MEM, SYMBOL_REF, LABEL_REF, CONST, PLUS }},
+
/* Tell final.c how to eliminate redundant test instructions. */
/* Here we define machine-dependent flags and fields in cc_status
@@ -975,9 +911,15 @@
{ if (GET_CODE (EXP) == SET) \
{ if (GET_CODE (SET_SRC (EXP)) == CALL) \
CC_STATUS_INIT; \
+ else if (GET_CODE (SET_SRC (EXP)) == COMPARE \
+ || GET_CODE (SET_SRC (EXP)) == PLUS \
+ || GET_CODE (SET_SRC (EXP)) == MINUS) \
+ { cc_status.flags = 0; \
+ cc_status.value1 = SET_DEST (EXP); \
+ cc_status.value2 = SET_SRC (EXP); } \
else if (GET_CODE (SET_DEST (EXP)) != ZERO_EXTRACT \
&& GET_CODE (SET_DEST (EXP)) != PC) \
- { cc_status.flags = 0; \
+ { cc_status.flags = CC_NO_OVERFLOW; \
cc_status.value1 = SET_DEST (EXP); \
cc_status.value2 = SET_SRC (EXP); } } \
else if (GET_CODE (EXP) == PARALLEL \
@@ -986,7 +928,7 @@
if (GET_CODE (SET_SRC (XVECEXP (EXP, 0, 0))) == CALL) \
CC_STATUS_INIT; \
else if (GET_CODE (SET_DEST (XVECEXP (EXP, 0, 0))) != PC) \
- { cc_status.flags = 0; \
+ { cc_status.flags = CC_NO_OVERFLOW; \
cc_status.value1 = SET_DEST (XVECEXP (EXP, 0, 0)); \
cc_status.value2 = SET_SRC (XVECEXP (EXP, 0, 0)); } \
else \
@@ -1028,15 +970,18 @@
/* Output before read-only data. */
-#define TEXT_SECTION_ASM_OP ".text"
+#define TEXT_SECTION_ASM_OP "\t.text"
/* Output before writable data. */
-#define DATA_SECTION_ASM_OP ".data"
+#define DATA_SECTION_ASM_OP "\t.data"
/* How to refer to registers in assembler output.
- This sequence is indexed by compiler's hard-register-number (see above). */
+ This sequence is indexed by compiler's hard-register-number (see above).
+ The register names will be prefixed by REGISTER_PREFIX, if any. */
+#define REGISTER_PREFIX ""
+
#define REGISTER_NAMES \
{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \
"r9", "r10", "r11", "ap", "fp", "sp", "pc"}
@@ -1146,25 +1091,45 @@
It need not be very fast code. */
#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
- fprintf (FILE, "\tpushl %s\n", reg_names[REGNO])
+ fprintf (FILE, "\tpushl %s%s\n", REGISTER_PREFIX, reg_names[REGNO])
/* This is how to output an insn to pop a register from the stack.
It need not be very fast code. */
#define ASM_OUTPUT_REG_POP(FILE,REGNO) \
- fprintf (FILE, "\tmovl (sp)+,%s\n", reg_names[REGNO])
+ fprintf (FILE, "\tmovl (%ssp)+,%s%s\n", REGISTER_PREFIX, REGISTER_PREFIX, \
+ reg_names[REGNO])
/* This is how to output an element of a case-vector that is absolute.
(The Vax does not use such vectors,
but we must define this macro anyway.) */
-#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
- fprintf (FILE, "\t.long L%d\n", VALUE)
+#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
+ do \
+ { \
+ char label[256]; \
+ ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \
+ fprintf (FILE, "\t.long "); \
+ assemble_name (FILE, label); \
+ fprintf (FILE, "\n"); \
+ } \
+ while (0)
/* This is how to output an element of a case-vector that is relative. */
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
- fprintf (FILE, "\t.word L%d-L%d\n", VALUE, REL)
+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
+ do \
+ { \
+ char label[256]; \
+ ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \
+ fprintf (FILE, "\t.word "); \
+ assemble_name (FILE, label); \
+ ASM_GENERATE_INTERNAL_LABEL (label, "L", (REL)); \
+ fprintf (FILE, "-"); \
+ assemble_name (FILE, label); \
+ fprintf (FILE, "\n"); \
+ } \
+ while (0)
/* This is how to output an assembler line
that says to advance the location counter
@@ -1223,7 +1188,7 @@
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \
fprintf (FILE, "\t.word 0x0ffc\n"); \
- fprintf (FILE, "\taddl2 $%d,4(ap)\n", DELTA); \
+ fprintf (FILE, "\taddl2 $%d,4(%sap)\n", DELTA, REGISTER_PREFIX); \
fprintf (FILE, "\tjmp "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "+2\n"); \
@@ -1271,7 +1236,7 @@
((CODE) == '#')
#define PRINT_OPERAND(FILE, X, CODE) \
-{ extern char *rev_cond_name (); \
+{ extern const char *rev_cond_name (); \
if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE); \
else if (CODE == 'C') \
fputs (rev_cond_name (X), FILE); \
@@ -1295,7 +1260,7 @@
else if (CODE == 'M' && GET_CODE (X) == CONST_INT) \
fprintf (FILE, "$%d", ~((1 << INTVAL (x)) - 1)); \
else if (GET_CODE (X) == REG) \
- fprintf (FILE, "%s", reg_names[REGNO (X)]); \
+ fprintf (FILE, "%s%s", REGISTER_PREFIX, reg_names[REGNO (X)]); \
else if (GET_CODE (X) == MEM) \
output_address (XEXP (X, 0)); \
else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \

File diff suppressed because it is too large Load diff

View file

@ -1,59 +0,0 @@
$NetBSD: patch-be,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/config/elfos.h.orig 2001/04/23 11:59:20 1.1.1.2
+++ ../gcc-2.95.3/gcc/config/elfos.h 2001/05/03 18:20:47 1.4
@@ -48,6 +48,7 @@
/* Output #ident as a .ident. */
+#undef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
@@ -57,7 +58,9 @@
/* Writing `int' for a bitfield forces int alignment for the structure. */
+#ifndef PCC_BITFIELD_TYPE_MATTERS
#define PCC_BITFIELD_TYPE_MATTERS 1
+#endif
/* Implicit library calls should use memcpy, not bcopy, etc. */
@@ -92,6 +95,10 @@
#undef SET_ASM_OP
#define SET_ASM_OP ".set"
+/* We want local labels to start with period if made with asm_fprintf. */
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX "."
+
/* This is how to begin an assembly language file. Most svr4 assemblers want
at least a .file directive to come first, and some want to see a .version
directive come right after that. Here we just establish a default
@@ -130,7 +137,7 @@
#undef ASM_OUTPUT_INTERNAL_LABEL
#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \
do { \
- fprintf (FILE, ".%s%d:\n", PREFIX, NUM); \
+ fprintf (FILE, "%s%s%d:\n", LOCAL_LABEL_PREFIX, PREFIX, NUM); \
} while (0)
/* This is how to store into the string LABEL
@@ -144,7 +151,7 @@
#undef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
do { \
- sprintf (LABEL, "*.%s%d", PREFIX, NUM); \
+ sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM); \
} while (0)
/* Output the label which precedes a jumptable. Note that for all svr4
@@ -462,6 +469,7 @@
/* This is how we tell the assembler that a symbol is weak. */
+#undef ASM_WEAKEN_LABEL
#define ASM_WEAKEN_LABEL(FILE,NAME) \
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
fputc ('\n', FILE); } while (0)

View file

@ -1,230 +0,0 @@
$NetBSD: patch-bf,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/config/netbsd.h.orig 2000/07/26 00:18:07 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/netbsd.h 2001/12/29 20:24:37 1.13
@@ -9,22 +9,22 @@
#undef GPLUSPLUS_INCLUDE_DIR
#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
-#undef GCC_INCLUDE_DIR
-#define GCC_INCLUDE_DIR "/usr/include"
+#undef STANDARD_INCLUDE_DIR
+#define STANDARD_INCLUDE_DIR "/usr/include"
#undef INCLUDE_DEFAULTS
#define INCLUDE_DEFAULTS \
{ \
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \
- { GCC_INCLUDE_DIR, "GCC", 0, 0 }, \
+ { STANDARD_INCLUDE_DIR, 0, 0, 0 }, \
{ 0, 0, 0, 0 } \
}
/* Under NetBSD, the normal location of the compiler back ends is the
/usr/libexec directory. */
-#undef STANDARD_EXEC_PREFIX
-#define STANDARD_EXEC_PREFIX "/usr/libexec/"
+#undef MD_EXEC_PREFIX
+#define MD_EXEC_PREFIX "/usr/libexec/"
/* Under NetBSD, the normal location of the various *crt*.o files is the
/usr/lib directory. */
@@ -32,14 +32,14 @@
#undef STANDARD_STARTFILE_PREFIX
#define STANDARD_STARTFILE_PREFIX "/usr/lib/"
-#endif
+#endif /* NETBSD_NATIVE */
/* Provide a CPP_SPEC appropriate for NetBSD. Current we just deal with
the GCC option `-posix'. */
#undef CPP_SPEC
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
/* Provide an ASM_SPEC appropriate for NetBSD. Currently we only deal
with the options for generating PIC code. */
@@ -48,17 +48,42 @@
#define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k -K}"
/* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate
- libc, depending on whether we're doing profiling. */
+ libc, depending on whether we're doing profiling; if `-posix' is specified,
+ link against the appropriate libposix first. Don't include libc when
+ linking a shared library. */
#undef LIB_SPEC
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define LIB_SPEC \
+ "%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \
+ %{!shared:%{!symbolic:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}}"
+
+/* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude
+ libgcc when -symbolic. */
+
+#undef LIBGCC_SPEC
+#ifdef NETBSD_NATIVE
+#define LIBGCC_SPEC "%{!symbolic:%{!shared:%{!p:%{!pg:-lgcc}}}%{shared:-lgcc_pic}%{p:-lgcc_p}%{pg:-lgcc_p}}"
+#else
+#define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}"
+#endif
+
+/* #ifdef NETBSD_AOUT */
+
+/* Provide a STARTFILE_SPEC appropriate for NetBSD a.out. Here we
+ provide support for the special GCC option -static. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:%{!static:crt0%O%s}%{static:scrt0%O%s}}}} %{shared:c++rt0%O%s}"
+
/* Provide a LINK_SPEC appropriate for NetBSD. Here we provide support
for the special GCC options -static, -assert, and -nostdlib. */
#undef LINK_SPEC
#define LINK_SPEC \
- "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
+ "%{nostdlib:-nostdlib} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic}} %{shared:-Bshareable} %{R*} %{assert*}"
+
+/* #endif NETBSD_AOUT */
/* This defines which switch letters take arguments. */
#undef SWITCH_TAKES_ARG
@@ -121,89 +146,49 @@
#ifndef ASM_DECLARE_RESULT
#define ASM_DECLARE_RESULT(FILE, RESULT)
#endif
+
+/* NetBSD ELF support begins here. */
+
+#ifdef NETBSD_ELF
+
+#undef DWARF_DEBUGGING_INFO /* XXX */
+#undef DWARF2_DEBUGGING_INFO /* XXX */
+
+/* Provide a STARTFILE_SPEC appropriate for NetBSD ELF targets. Here we
+ provide support for the special GCC option -static. On ELF targets,
+ we also add the crtbegin.o file which provides part of the support
+ for getting C++ file-scope static objects constructed before entering
+ `main'. */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "%{!shared: \
+ %{pg:gcrt0%O%s} \
+ %{!pg: \
+ %{p:gcrt0%O%s} \
+ %{!p:crt0%O%s}}} \
+ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}"
+
+/* Provide an ENDFILE_SPEC appropriate for NetBSD ELF targets. Here we
+ add crtend.o, which provides part of the support for getting C++
+ file-scope static objects deconstructed after exiting `main'. */
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
+/* Provide a LINK_SPEC appropriate for a NetBSD ELF target. */
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{assert*} \
+ %{shared:-shared} \
+ %{!shared: \
+ -dc -dp \
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
+ %{static:-static}}"
-/* These macros generate the special .type and .size directives which
- are used to set the corresponding fields of the linker symbol table
- entries in an ELF object file under SVR4. These macros also output
- the starting labels for the relevant functions/objects. */
-
-/* Write the extra assembler code needed to declare a function properly.
- Some svr4 assemblers need to also have something extra said about the
- function's return value. We allow for that here. */
-
-#undef ASM_DECLARE_FUNCTION_NAME
-#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
- do { \
- fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
- assemble_name (FILE, NAME); \
- putc (',', FILE); \
- fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
- putc ('\n', FILE); \
- ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
- ASM_OUTPUT_LABEL(FILE, NAME); \
- } while (0)
-
-/* Write the extra assembler code needed to declare an object properly. */
-
-#undef ASM_DECLARE_OBJECT_NAME
-#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
- do { \
- fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
- assemble_name (FILE, NAME); \
- putc (',', FILE); \
- fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
- putc ('\n', FILE); \
- size_directive_output = 0; \
- if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
- { \
- size_directive_output = 1; \
- fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
- } \
- ASM_OUTPUT_LABEL(FILE, NAME); \
- } while (0)
-
-/* Output the size directive for a decl in rest_of_decl_compilation
- in the case where we did not do so before the initializer.
- Once we find the error_mark_node, we know that the value of
- size_directive_output was set
- by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
-
-#undef ASM_FINISH_DECLARE_OBJECT
-#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
-do { \
- char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
- if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
- && ! AT_END && TOP_LEVEL \
- && DECL_INITIAL (DECL) == error_mark_node \
- && !size_directive_output) \
- { \
- size_directive_output = 1; \
- fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
- assemble_name (FILE, name); \
- fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
- } \
- } while (0)
-
-/* This is how to declare the size of a function. */
-
-#undef ASM_DECLARE_FUNCTION_SIZE
-#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
- do { \
- if (!flag_inhibit_size_directive) \
- { \
- char label[256]; \
- static int labelno; \
- labelno++; \
- ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
- ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
- fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
- assemble_name (FILE, (FNAME)); \
- fprintf (FILE, ","); \
- assemble_name (FILE, label); \
- fprintf (FILE, "-"); \
- assemble_name (FILE, (FNAME)); \
- putc ('\n', FILE); \
- } \
- } while (0)
+#endif /* NETBSD_ELF */

View file

@ -1,20 +0,0 @@
$NetBSD: patch-bg,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/config/t-netbsd.orig 2000/07/26 00:18:08 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/t-netbsd 2001/05/30 09:02:42 1.3
@@ -1,9 +1,9 @@
-LIBGCC1=libgcc1.null
-CROSS_LIBGCC1=libgcc1.null
-LIBGCC1_TEST=
-
-# Don't run fixproto
+# Don't run fixproto.
STMP_FIXPROTO =
-# Don't install "assert.h" in gcc. We use the one in glibc.
+# Don't install "assert.h" in gcc. We use the one in NetBSD's libc.
INSTALL_ASSERT_H =
+
+# The stdarg, varargs, etc. that comes with NetBSD is already sane.
+# Don't override these with local versions.
+USER_H = $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS)

View file

@ -1,13 +0,0 @@
$NetBSD: patch-bh,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/ginclude/va-sparc.h.orig 2000/07/26 00:18:59 1.1.1.1
+++ ../gcc-2.95.3/gcc/ginclude/va-sparc.h 2001/01/30 22:36:39 1.2
@@ -5,7 +5,7 @@
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
-#if ! defined (__svr4__) && ! defined (__linux__) && ! defined (__arch64__)
+#if ! defined (__svr4__) && ! defined (__linux__) && (defined(__NetBSD__) || ! defined(__arch64__))
/* This has to be a char * to be compatible with Sun.
i.e., we have to pass a `va_list' to vsprintf. */
typedef char * __gnuc_va_list;

View file

@ -1,18 +0,0 @@
$NetBSD: patch-bi,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/objc/objc-act.c.orig 2000/07/26 00:19:06 1.1.1.1
+++ ../gcc-2.95.3/gcc/objc/objc-act.c 2000/08/10 21:06:50 1.2
@@ -8399,8 +8399,11 @@
pushdecl (decl);
rest_of_decl_compilation (decl, 0, 0, 0);
- /* Make following constant read-only (why not)? */
- readonly_data_section ();
+ /* Make following constant read-only, if not compiling PIC. */
+ if (flag_pic)
+ data_section();
+ else
+ readonly_data_section ();
exp = build1 (ADDR_EXPR, string_type_node, decl);

View file

@ -1,443 +0,0 @@
$NetBSD: patch-bj,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/objc/objc-parse.c.orig 2000/07/26 00:19:06 1.1.1.1
+++ ../gcc-2.95.3/gcc/objc/objc-parse.c 2001/03/06 05:21:48 1.2
@@ -1,69 +1,68 @@
/* A Bison parser, made from objc-parse.y
- by GNU Bison version 1.25
- */
+ by GNU Bison version 1.28 */
#define YYBISON 1 /* Identify Bison output. */
-#define IDENTIFIER 258
-#define TYPENAME 259
-#define SCSPEC 260
-#define TYPESPEC 261
-#define TYPE_QUAL 262
-#define CONSTANT 263
-#define STRING 264
-#define ELLIPSIS 265
-#define SIZEOF 266
-#define ENUM 267
-#define STRUCT 268
-#define UNION 269
-#define IF 270
-#define ELSE 271
-#define WHILE 272
-#define DO 273
-#define FOR 274
-#define SWITCH 275
-#define CASE 276
-#define DEFAULT 277
-#define BREAK 278
-#define CONTINUE 279
-#define RETURN 280
-#define GOTO 281
-#define ASM_KEYWORD 282
-#define TYPEOF 283
-#define ALIGNOF 284
-#define ATTRIBUTE 285
-#define EXTENSION 286
-#define LABEL 287
-#define REALPART 288
-#define IMAGPART 289
-#define ASSIGN 290
-#define OROR 291
-#define ANDAND 292
-#define EQCOMPARE 293
-#define ARITHCOMPARE 294
-#define LSHIFT 295
-#define RSHIFT 296
-#define UNARY 297
-#define PLUSPLUS 298
-#define MINUSMINUS 299
-#define HYPERUNARY 300
-#define POINTSAT 301
-#define INTERFACE 302
-#define IMPLEMENTATION 303
-#define END 304
-#define SELECTOR 305
-#define DEFS 306
-#define ENCODE 307
-#define CLASSNAME 308
-#define PUBLIC 309
-#define PRIVATE 310
-#define PROTECTED 311
-#define PROTOCOL 312
-#define OBJECTNAME 313
-#define CLASS 314
-#define ALIAS 315
-#define OBJC_STRING 316
+#define IDENTIFIER 257
+#define TYPENAME 258
+#define SCSPEC 259
+#define TYPESPEC 260
+#define TYPE_QUAL 261
+#define CONSTANT 262
+#define STRING 263
+#define ELLIPSIS 264
+#define SIZEOF 265
+#define ENUM 266
+#define STRUCT 267
+#define UNION 268
+#define IF 269
+#define ELSE 270
+#define WHILE 271
+#define DO 272
+#define FOR 273
+#define SWITCH 274
+#define CASE 275
+#define DEFAULT 276
+#define BREAK 277
+#define CONTINUE 278
+#define RETURN 279
+#define GOTO 280
+#define ASM_KEYWORD 281
+#define TYPEOF 282
+#define ALIGNOF 283
+#define ATTRIBUTE 284
+#define EXTENSION 285
+#define LABEL 286
+#define REALPART 287
+#define IMAGPART 288
+#define ASSIGN 289
+#define OROR 290
+#define ANDAND 291
+#define EQCOMPARE 292
+#define ARITHCOMPARE 293
+#define LSHIFT 294
+#define RSHIFT 295
+#define UNARY 296
+#define PLUSPLUS 297
+#define MINUSMINUS 298
+#define HYPERUNARY 299
+#define POINTSAT 300
+#define INTERFACE 301
+#define IMPLEMENTATION 302
+#define END 303
+#define SELECTOR 304
+#define DEFS 305
+#define ENCODE 306
+#define CLASSNAME 307
+#define PUBLIC 308
+#define PRIVATE 309
+#define PROTECTED 310
+#define PROTOCOL 311
+#define OBJECTNAME 312
+#define CLASS 313
+#define ALIAS 314
+#define OBJC_STRING 315
#line 33 "objc-parse.y"
@@ -150,7 +149,7 @@
#define YYFLAG -32768
#define YYNTBASE 84
-#define YYTRANSLATE(x) ((unsigned)(x) <= 316 ? yytranslate[x] : 311)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 315 ? yytranslate[x] : 311)
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -178,13 +177,13 @@
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 39, 40, 44, 45, 46, 47, 53, 54, 55, 56,
- 57, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75
+ 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 39,
+ 40, 44, 45, 46, 47, 53, 54, 55, 56, 57,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75
};
#if YYDEBUG != 0
@@ -1674,7 +1673,8 @@
47, 48, 49, 50, 51, 52
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/lib/bison.simple"
+#line 3 "/usr/pkg/share/bison.simple"
+/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -1691,46 +1691,66 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
-#ifndef alloca
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
#include <alloca.h>
#else /* not sparc */
-#if defined (MSDOS) && !defined (__TURBOC__)
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
#include <malloc.h>
+#endif
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
-#include <malloc.h>
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
#pragma alloca
-#else /* not MSDOS, __TURBOC__, or _AIX */
-#ifdef __hpux
-#ifdef __cplusplus
-extern "C" {
-void *alloca (unsigned int);
-};
-#else /* not __cplusplus */
-void *alloca ();
-#endif /* not __cplusplus */
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
#endif /* __hpux */
+#endif
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc. */
-#endif /* not GNU C. */
-#endif /* alloca not defined. */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
@@ -1740,8 +1760,8 @@
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
-#define YYACCEPT return(0)
-#define YYABORT return(1)
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
@@ -1822,12 +1842,12 @@
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-int yyparse (void);
-#endif
+/* Define __yy_memcpy. Note that the size argument
+ should be passed with type unsigned int, because that is what the non-GCC
+ definitions require. With GCC, __builtin_memcpy takes an arg
+ of type size_t, but it can handle unsigned int. */
+
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
@@ -1839,7 +1859,7 @@
__yy_memcpy (to, from, count)
char *to;
char *from;
- int count;
+ unsigned int count;
{
register char *f = from;
register char *t = to;
@@ -1854,10 +1874,10 @@
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
-__yy_memcpy (char *to, char *from, int count)
+__yy_memcpy (char *to, char *from, unsigned int count)
{
- register char *f = from;
register char *t = to;
+ register char *f = from;
register int i = count;
while (i-- > 0)
@@ -1867,7 +1887,7 @@
#endif
#endif
-#line 196 "/usr/lib/bison.simple"
+#line 217 "/usr/pkg/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -1888,6 +1908,15 @@
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
int
yyparse(YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
@@ -1916,6 +1945,7 @@
#endif
int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
#ifdef YYPURE
int yychar;
@@ -2000,18 +2030,32 @@
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow");
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
- yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
+#ifndef YYSTACK_USE_ALLOCA
+ yyfree_stacks = 1;
+#endif
+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1,
+ size * (unsigned int) sizeof (*yyssp));
+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1,
+ size * (unsigned int) sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
@@ -4995,7 +5039,7 @@
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/lib/bison.simple"
+#line 543 "/usr/pkg/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@@ -5067,7 +5111,7 @@
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
+ x < (int)(sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
@@ -5079,7 +5123,7 @@
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
+ x < (int)(sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
@@ -5190,6 +5234,30 @@
yystate = yyn;
goto yynewstate;
+
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
+
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 1;
}
#line 3003 "objc-parse.y"

View file

@ -1,64 +0,0 @@
$NetBSD: patch-bk,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/ChangeLog.orig 2001/04/23 11:57:52 1.1.1.2
+++ ../gcc-2.95.3/gcc/ChangeLog 2001/04/23 12:23:26 1.4
@@ -1,3 +1,59 @@
+2001-01-05 matthew green (mrg@eterna.com.au)
+
+ 1999/08/02 Jakub Jelinek <jj@ultra.linux.cz>
+ * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): New macro.
+ (RTX_OK_FOR_OLO10): Likewise.
+ (GO_IF_LEGITIMATE_ADDRESS): If assembler supports offsetable
+ %lo(), allow it in addresses...
+ (PRINT_OPERAND_ADDRESS): ... and print it appropriately.
+ * config/sparc/sparc.md (sethi_di_medlow_embmedany_pic): sethi %lo()
+ does not make sense.
+ * config/sparc/sparc.c (sparc_hard_reg_printed): New array.
+ (sparc_output_scratch_registers): New function.
+ (output_function_prologue, sparc_flat_output_function_prologue): Use
+ it.
+ * varasm.c (make_decl_rtl): Use ASM_DECLARE_REGISTER_GLOBAL if
+ defined.
+ * tm.texi (ASM_DECLARE_REGISTER_GLOBAL): Document it.
+
+2001-01-05 matthew green (mrg@eterna.com.au)
+
+ 1999/07/30 Jakub Jelinek <jj@ultra.linux.cz>
+ * config/sparc/sparc.md (cmp_mul_set, cmp_udiv_cc_set):
+ Fix patterns so that they actually match.
+ (cmp_sdiv_cc_set): Ditto, also don't require g0 to be zero.
+ (mulsidi3_sp64, const_mulsidi3_sp64): New patterns.
+ (const_mulsidi3_sp32): Renamed from const_mulsidi3, only on
+ TARGET_HARD_MUL32.
+ (mulsidi3): Reflect this in the expand.
+ (smulsi3_highpart): Only on TARGET_ARCH32.
+ (umulsidi3_sp64, const_umulsidi3_sp64): New patterns.
+ (const_umulsidi3_sp32): Renamed from const_umulsidi3.
+ (umulsidi3): Reflect this in the expand.
+ (umulsi3_highpart): Only on TARGET_ARCH32.
+ (divsi3_sp32): Renamed from divsi3, only on TARGET_ARCH32,
+ don't require g0 to be zero.
+ (udivsi3_sp32): Renamed from udivsi3, only on TARGET_ARCH32.
+ ({,u}divsi3): New expands.
+ ({,u}divsi3_sp64): New patterns.
+ (after lshrdi3_v8plus): Four new patterns to help combiner
+ optimizing nested mixed mode shifts.
+
+ * config/sparc/sparc.c (sparc_override_options): Use deprecated
+ v8 instructions if optimizing for UltraSPARC I, II, IIi, as it
+ speed things up. Don't use them by default on plain v9 in 64bit
+ mode, according to what SPAMv9 sais.
+
+ * config/sparc/sparc.h: Fix comments, e.g. Linux already preserves
+ top 32 bits of %[og][0-7] in signal handlers.
+ Also, TARGET_HARD_MUL32 now is only true for TARGET_ARCH32.
+
+2001-01-03 matthew green (mrg@eterna.com.au)
+
+ 1999-12-14 Jakub Jelinek <jakub@redhat.com>
+ * config/sparc/sparc.c (sparc_override_options): Allow block
+ profiling with -m32.
+
Fri Mar 16 12:46:19 GMT 2001 Bernd Schmidt (bernds@redhat.com)
* gcc-2.95.3 Released.

View file

@ -1,189 +0,0 @@
$NetBSD: patch-bl,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/Makefile.in.orig 2001/04/23 11:57:55 1.1.1.2
+++ ../gcc-2.95.3/gcc/Makefile.in 2001/12/02 04:10:11 1.4
@@ -41,7 +41,7 @@
# Selection of languages to be made.
# This is overridden by configure.
CONFIG_LANGUAGES = @all_languages@
-LANGUAGES = c proto gcov$(exeext) $(CONFIG_LANGUAGES)
+LANGUAGES = c gcov$(exeext) $(CONFIG_LANGUAGES)
# Languages should create dependencies of $(INTL_TARGETS) on generated
# sources in Make-lang.in. Example:
@@ -802,27 +802,6 @@
LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.run
rm -f config.run
-$(srcdir)/configure: $(srcdir)/configure.in
- cd $(srcdir); autoconf
-
-# cstamp-h.in controls rebuilding of config.in.
-# It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
-# delete it. A stamp file is needed as autoheader won't update the file if
-# nothing has changed.
-# It remains in the source directory and is part of the distribution.
-# This follows what is done in shellutils, fileutils, etc.
-# "echo timestamp" is used instead of touch to be consistent with other
-# packages that use autoconf (??? perhaps also to avoid problems with patch?).
-# ??? Newer versions have a maintainer mode that may be useful here.
-$(srcdir)/config.in: $(srcdir)/cstamp-h.in
-$(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
- cd $(srcdir) && autoheader
- @rm -f $(srcdir)/cstamp-h.in
- echo timestamp > $(srcdir)/cstamp-h.in
-auto-host.h: cstamp-h ; @true
-cstamp-h: config.in config.status
- CONFIG_HEADERS=auto-host.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status
-
# Really, really stupid make features, such as SUN's KEEP_STATE, may force
# a target to build even if it is up-to-date. So we must verify that
# config.status does not exist before failing.
@@ -1185,7 +1164,7 @@
"$(MULTILIB_MATCHES)" \
"$(MULTILIB_EXCEPTIONS)" \
"$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
- $(srcdir)/move-if-change tmp-mlib.h multilib.h
+ sh $(srcdir)/move-if-change tmp-mlib.h multilib.h
touch s-mlib
# Build multiple copies of libgcc.a, one for each target switch.
@@ -1331,12 +1310,12 @@
sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
-e "/^ifc$$/d" -e "/^end ifc$$/d" \
$(srcdir)/c-parse.in >>tmp-c-parse.y
- $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
+ sh $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
$(srcdir)/c-gperf.h: c-parse.gperf
gperf -L C -F ', 0, 0' -p -j1 -i 1 -g -o -t -G -N is_reserved_word \
-k1,3,$$ $(srcdir)/c-parse.gperf >tmp-gperf.h
- $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
+ sh $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \
output.h toplev.h
@@ -1396,7 +1375,7 @@
else \
echo "int prepends_underscore = 0;" >>tmp-under.c; \
fi
- $(srcdir)/move-if-change tmp-under.c underscore.c
+ sh $(srcdir)/move-if-change tmp-under.c underscore.c
-rm -f tmp-dum.c tmp-dum.s
touch s-under
@@ -1425,7 +1404,7 @@
tree-check.h: s-check ; @true
s-check : gencheck $(srcdir)/move-if-change
./gencheck > tmp-check.h
- $(srcdir)/move-if-change tmp-check.h tree-check.h
+ sh $(srcdir)/move-if-change tmp-check.h tree-check.h
touch s-check
gencheck : gencheck.o $(lang_tree_files) $(HOST_LIBDEPS)
@@ -1650,19 +1629,19 @@
insn-config.h: s-config ; @true
s-config : $(md_file) genconfig $(srcdir)/move-if-change
./genconfig $(md_file) > tmp-config.h
- $(srcdir)/move-if-change tmp-config.h insn-config.h
+ sh $(srcdir)/move-if-change tmp-config.h insn-config.h
touch s-config
insn-flags.h: s-flags ; @true
s-flags : $(md_file) genflags $(srcdir)/move-if-change
./genflags $(md_file) > tmp-flags.h
- $(srcdir)/move-if-change tmp-flags.h insn-flags.h
+ sh $(srcdir)/move-if-change tmp-flags.h insn-flags.h
touch s-flags
insn-codes.h: s-codes ; @true
s-codes : $(md_file) gencodes $(srcdir)/move-if-change
./gencodes $(md_file) > tmp-codes.h
- $(srcdir)/move-if-change tmp-codes.h insn-codes.h
+ sh $(srcdir)/move-if-change tmp-codes.h insn-codes.h
touch s-codes
insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \
@@ -1672,7 +1651,7 @@
insn-emit.c: s-emit ; @true
s-emit : $(md_file) genemit $(srcdir)/move-if-change
./genemit $(md_file) > tmp-emit.c
- $(srcdir)/move-if-change tmp-emit.c insn-emit.c
+ sh $(srcdir)/move-if-change tmp-emit.c insn-emit.c
touch s-emit
insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \
@@ -1682,7 +1661,7 @@
insn-recog.c: s-recog ; @true
s-recog : $(md_file) genrecog $(srcdir)/move-if-change
./genrecog $(md_file) > tmp-recog.c
- $(srcdir)/move-if-change tmp-recog.c insn-recog.c
+ sh $(srcdir)/move-if-change tmp-recog.c insn-recog.c
touch s-recog
insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
@@ -1692,7 +1671,7 @@
insn-opinit.c: s-opinit ; @true
s-opinit : $(md_file) genopinit $(srcdir)/move-if-change
./genopinit $(md_file) > tmp-opinit.c
- $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
+ sh $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
touch s-opinit
insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h \
@@ -1702,7 +1681,7 @@
insn-extract.c: s-extract ; @true
s-extract : $(md_file) genextract $(srcdir)/move-if-change
./genextract $(md_file) > tmp-extract.c
- $(srcdir)/move-if-change tmp-extract.c insn-extract.c
+ sh $(srcdir)/move-if-change tmp-extract.c insn-extract.c
touch s-extract
insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \
@@ -1712,7 +1691,7 @@
insn-peep.c: s-peep ; @true
s-peep : $(md_file) genpeep $(srcdir)/move-if-change
./genpeep $(md_file) > tmp-peep.c
- $(srcdir)/move-if-change tmp-peep.c insn-peep.c
+ sh $(srcdir)/move-if-change tmp-peep.c insn-peep.c
touch s-peep
insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h \
@@ -1722,7 +1701,7 @@
insn-attr.h: s-attr ; @true
s-attr : $(md_file) genattr $(srcdir)/move-if-change
./genattr $(md_file) > tmp-attr.h
- $(srcdir)/move-if-change tmp-attr.h insn-attr.h
+ sh $(srcdir)/move-if-change tmp-attr.h insn-attr.h
touch s-attr
insn-attrtab.c: s-attrtab ; @true
@@ -1734,7 +1713,7 @@
else \
./genattrtab $(md_file) > tmp-attrtab.c; \
fi
- $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
+ sh $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
touch s-attrtab
insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h conditions.h \
@@ -1745,7 +1724,7 @@
insn-output.c: s-output ; @true
s-output : $(md_file) genoutput $(srcdir)/move-if-change
./genoutput $(md_file) > tmp-output.c
- $(srcdir)/move-if-change tmp-output.c insn-output.c
+ sh $(srcdir)/move-if-change tmp-output.c insn-output.c
touch s-output
genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) system.h
@@ -1754,8 +1733,8 @@
s-genrtl: gengenrtl $(srcdir)/move-if-change $(RTL_BASE_H)
./gengenrtl tmp-genrtl.h tmp-genrtl.c
- $(srcdir)/move-if-change tmp-genrtl.h genrtl.h
- $(srcdir)/move-if-change tmp-genrtl.c genrtl.c
+ sh $(srcdir)/move-if-change tmp-genrtl.h genrtl.h
+ sh $(srcdir)/move-if-change tmp-genrtl.c genrtl.c
touch s-genrtl
#

View file

@ -1,44 +0,0 @@
$NetBSD: patch-bm,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/c-common.c.orig 2000/07/26 00:17:20 1.1.1.1
+++ ../gcc-2.95.3/gcc/c-common.c 2001/01/31 19:58:32 1.5
@@ -1132,7 +1132,7 @@
{ "D", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "2" },
{ "g", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "2O-_0w" },
{ "cx", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "3E" },
- { "%RTXnrt", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "" },
+ { "%FRTXnrt", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "" },
{ "P", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "G" },
{ "HIMSUWdemw", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "-_0Ow" },
{ "Vju", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "-_0Oow" },
@@ -1398,7 +1398,8 @@
if (integer_zerop (format_tree))
{
- warning ("null format string");
+ if (pedantic)
+ warning ("null format string");
return;
}
if (TREE_CODE (format_tree) != ADDR_EXPR)
@@ -1432,8 +1433,6 @@
{
if (format_chars - TREE_STRING_POINTER (format_tree) != format_length)
warning ("embedded `\\0' in format");
- if (info->first_arg_num != 0 && params != 0 && ! has_operand_number)
- warning ("too many arguments for format");
return;
}
if (*format_chars++ != '%')
@@ -1722,11 +1721,6 @@
}
if (wide && index (fci->flag_chars, 'w') == 0)
warning ("width used with `%c' format", format_char);
- if (index (fci->flag_chars, '2') != 0)
- warning ("`%%%c' yields only last 2 digits of year", format_char);
- else if (index (fci->flag_chars, '3') != 0)
- warning ("`%%%c' yields only last 2 digits of year in some locales",
- format_char);
if (precise && index (fci->flag_chars, 'p') == 0)
warning ("precision used with `%c' format", format_char);
if (aflag && index (fci->flag_chars, 'a') == 0)

View file

@ -1,15 +0,0 @@
$NetBSD: patch-bn,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/c-decl.c.orig 2001/04/23 11:57:59 1.1.1.2
+++ ../gcc-2.95.3/gcc/c-decl.c 2001/04/23 12:23:27 1.4
@@ -811,6 +811,10 @@
warn_traditional = 0;
else if (!strcmp (p, "-Wformat"))
warn_format = 1;
+ else if (!strcmp (p, "-Wno-format-y2k"))
+ { /* XXX: NetBSD compatibility until next gcc release */ }
+ else if (!strcmp (p, "-Wno-format-extra-args"))
+ { /* XXX: NetBSD compatibility until next gcc release */ }
else if (!strcmp (p, "-Wno-format"))
warn_format = 0;
else if (!strcmp (p, "-Wchar-subscripts"))

View file

@ -1,443 +0,0 @@
$NetBSD: patch-bo,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/c-parse.c.orig 2000/07/26 00:17:21 1.1.1.1
+++ ../gcc-2.95.3/gcc/c-parse.c 2002/01/30 15:16:06 1.4
@@ -1,69 +1,68 @@
/* A Bison parser, made from c-parse.y
- by GNU Bison version 1.25
- */
+ by GNU Bison version 1.28 */
#define YYBISON 1 /* Identify Bison output. */
-#define IDENTIFIER 258
-#define TYPENAME 259
-#define SCSPEC 260
-#define TYPESPEC 261
-#define TYPE_QUAL 262
-#define CONSTANT 263
-#define STRING 264
-#define ELLIPSIS 265
-#define SIZEOF 266
-#define ENUM 267
-#define STRUCT 268
-#define UNION 269
-#define IF 270
-#define ELSE 271
-#define WHILE 272
-#define DO 273
-#define FOR 274
-#define SWITCH 275
-#define CASE 276
-#define DEFAULT 277
-#define BREAK 278
-#define CONTINUE 279
-#define RETURN 280
-#define GOTO 281
-#define ASM_KEYWORD 282
-#define TYPEOF 283
-#define ALIGNOF 284
-#define ATTRIBUTE 285
-#define EXTENSION 286
-#define LABEL 287
-#define REALPART 288
-#define IMAGPART 289
-#define ASSIGN 290
-#define OROR 291
-#define ANDAND 292
-#define EQCOMPARE 293
-#define ARITHCOMPARE 294
-#define LSHIFT 295
-#define RSHIFT 296
-#define UNARY 297
-#define PLUSPLUS 298
-#define MINUSMINUS 299
-#define HYPERUNARY 300
-#define POINTSAT 301
-#define INTERFACE 302
-#define IMPLEMENTATION 303
-#define END 304
-#define SELECTOR 305
-#define DEFS 306
-#define ENCODE 307
-#define CLASSNAME 308
-#define PUBLIC 309
-#define PRIVATE 310
-#define PROTECTED 311
-#define PROTOCOL 312
-#define OBJECTNAME 313
-#define CLASS 314
-#define ALIAS 315
-#define OBJC_STRING 316
+#define IDENTIFIER 257
+#define TYPENAME 258
+#define SCSPEC 259
+#define TYPESPEC 260
+#define TYPE_QUAL 261
+#define CONSTANT 262
+#define STRING 263
+#define ELLIPSIS 264
+#define SIZEOF 265
+#define ENUM 266
+#define STRUCT 267
+#define UNION 268
+#define IF 269
+#define ELSE 270
+#define WHILE 271
+#define DO 272
+#define FOR 273
+#define SWITCH 274
+#define CASE 275
+#define DEFAULT 276
+#define BREAK 277
+#define CONTINUE 278
+#define RETURN 279
+#define GOTO 280
+#define ASM_KEYWORD 281
+#define TYPEOF 282
+#define ALIGNOF 283
+#define ATTRIBUTE 284
+#define EXTENSION 285
+#define LABEL 286
+#define REALPART 287
+#define IMAGPART 288
+#define ASSIGN 289
+#define OROR 290
+#define ANDAND 291
+#define EQCOMPARE 292
+#define ARITHCOMPARE 293
+#define LSHIFT 294
+#define RSHIFT 295
+#define UNARY 296
+#define PLUSPLUS 297
+#define MINUSMINUS 298
+#define HYPERUNARY 299
+#define POINTSAT 300
+#define INTERFACE 301
+#define IMPLEMENTATION 302
+#define END 303
+#define SELECTOR 304
+#define DEFS 305
+#define ENCODE 306
+#define CLASSNAME 307
+#define PUBLIC 308
+#define PRIVATE 309
+#define PROTECTED 310
+#define PROTOCOL 311
+#define OBJECTNAME 312
+#define CLASS 313
+#define ALIAS 314
+#define OBJC_STRING 315
#line 56 "c-parse.y"
@@ -138,7 +137,7 @@
#define YYFLAG -32768
#define YYNTBASE 84
-#define YYTRANSLATE(x) ((unsigned)(x) <= 316 ? yytranslate[x] : 241)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 315 ? yytranslate[x] : 241)
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -166,13 +165,13 @@
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 39, 40, 44, 45, 46, 47, 53, 54, 55, 56,
- 57, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75
+ 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 39,
+ 40, 44, 45, 46, 47, 53, 54, 55, 56, 57,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75
};
#if YYDEBUG != 0
@@ -1205,7 +1204,8 @@
50, 51, 52
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/lib/bison.simple"
+#line 3 "/usr/pkg/share/bison.simple"
+/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -1222,46 +1222,66 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
-#ifndef alloca
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
#include <alloca.h>
#else /* not sparc */
-#if defined (MSDOS) && !defined (__TURBOC__)
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
#include <malloc.h>
+#endif
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
-#include <malloc.h>
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
#pragma alloca
-#else /* not MSDOS, __TURBOC__, or _AIX */
-#ifdef __hpux
-#ifdef __cplusplus
-extern "C" {
-void *alloca (unsigned int);
-};
-#else /* not __cplusplus */
-void *alloca ();
-#endif /* not __cplusplus */
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
#endif /* __hpux */
+#endif
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc. */
-#endif /* not GNU C. */
-#endif /* alloca not defined. */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
@@ -1271,8 +1291,8 @@
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
-#define YYACCEPT return(0)
-#define YYABORT return(1)
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
@@ -1353,12 +1373,12 @@
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-int yyparse (void);
-#endif
+/* Define __yy_memcpy. Note that the size argument
+ should be passed with type unsigned int, because that is what the non-GCC
+ definitions require. With GCC, __builtin_memcpy takes an arg
+ of type size_t, but it can handle unsigned int. */
+
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
@@ -1370,7 +1390,7 @@
__yy_memcpy (to, from, count)
char *to;
char *from;
- int count;
+ unsigned int count;
{
register char *f = from;
register char *t = to;
@@ -1385,10 +1405,10 @@
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
-__yy_memcpy (char *to, char *from, int count)
+__yy_memcpy (char *to, char *from, unsigned int count)
{
- register char *f = from;
register char *t = to;
+ register char *f = from;
register int i = count;
while (i-- > 0)
@@ -1398,7 +1418,7 @@
#endif
#endif
-#line 196 "/usr/lib/bison.simple"
+#line 217 "/usr/pkg/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -1419,6 +1439,15 @@
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
int
yyparse(YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
@@ -1447,6 +1476,7 @@
#endif
int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
#ifdef YYPURE
int yychar;
@@ -1531,18 +1561,32 @@
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow");
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
- yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
+#ifndef YYSTACK_USE_ALLOCA
+ yyfree_stacks = 1;
+#endif
+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1,
+ size * (unsigned int) sizeof (*yyssp));
+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1,
+ size * (unsigned int) sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
@@ -3745,7 +3789,7 @@
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/lib/bison.simple"
+#line 543 "/usr/pkg/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@@ -3817,7 +3861,7 @@
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
+ x < (int)(sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
@@ -3829,7 +3873,7 @@
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
+ x < (int)(sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
@@ -3940,6 +3984,30 @@
yystate = yyn;
goto yynewstate;
+
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
+
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 1;
}
#line 2238 "c-parse.y"

View file

@ -1,128 +0,0 @@
$NetBSD: patch-bp,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/c-parse.h.orig 2000/07/26 00:17:22 1.1.1.1
+++ ../gcc-2.95.3/gcc/c-parse.h 2002/01/30 15:16:07 1.4
@@ -1,64 +1,64 @@
typedef union {long itype; tree ttype; enum tree_code code;
char *filename; int lineno; int ends_in_label; } YYSTYPE;
-#define IDENTIFIER 258
-#define TYPENAME 259
-#define SCSPEC 260
-#define TYPESPEC 261
-#define TYPE_QUAL 262
-#define CONSTANT 263
-#define STRING 264
-#define ELLIPSIS 265
-#define SIZEOF 266
-#define ENUM 267
-#define STRUCT 268
-#define UNION 269
-#define IF 270
-#define ELSE 271
-#define WHILE 272
-#define DO 273
-#define FOR 274
-#define SWITCH 275
-#define CASE 276
-#define DEFAULT 277
-#define BREAK 278
-#define CONTINUE 279
-#define RETURN 280
-#define GOTO 281
-#define ASM_KEYWORD 282
-#define TYPEOF 283
-#define ALIGNOF 284
-#define ATTRIBUTE 285
-#define EXTENSION 286
-#define LABEL 287
-#define REALPART 288
-#define IMAGPART 289
-#define ASSIGN 290
-#define OROR 291
-#define ANDAND 292
-#define EQCOMPARE 293
-#define ARITHCOMPARE 294
-#define LSHIFT 295
-#define RSHIFT 296
-#define UNARY 297
-#define PLUSPLUS 298
-#define MINUSMINUS 299
-#define HYPERUNARY 300
-#define POINTSAT 301
-#define INTERFACE 302
-#define IMPLEMENTATION 303
-#define END 304
-#define SELECTOR 305
-#define DEFS 306
-#define ENCODE 307
-#define CLASSNAME 308
-#define PUBLIC 309
-#define PRIVATE 310
-#define PROTECTED 311
-#define PROTOCOL 312
-#define OBJECTNAME 313
-#define CLASS 314
-#define ALIAS 315
-#define OBJC_STRING 316
+#define IDENTIFIER 257
+#define TYPENAME 258
+#define SCSPEC 259
+#define TYPESPEC 260
+#define TYPE_QUAL 261
+#define CONSTANT 262
+#define STRING 263
+#define ELLIPSIS 264
+#define SIZEOF 265
+#define ENUM 266
+#define STRUCT 267
+#define UNION 268
+#define IF 269
+#define ELSE 270
+#define WHILE 271
+#define DO 272
+#define FOR 273
+#define SWITCH 274
+#define CASE 275
+#define DEFAULT 276
+#define BREAK 277
+#define CONTINUE 278
+#define RETURN 279
+#define GOTO 280
+#define ASM_KEYWORD 281
+#define TYPEOF 282
+#define ALIGNOF 283
+#define ATTRIBUTE 284
+#define EXTENSION 285
+#define LABEL 286
+#define REALPART 287
+#define IMAGPART 288
+#define ASSIGN 289
+#define OROR 290
+#define ANDAND 291
+#define EQCOMPARE 292
+#define ARITHCOMPARE 293
+#define LSHIFT 294
+#define RSHIFT 295
+#define UNARY 296
+#define PLUSPLUS 297
+#define MINUSMINUS 298
+#define HYPERUNARY 299
+#define POINTSAT 300
+#define INTERFACE 301
+#define IMPLEMENTATION 302
+#define END 303
+#define SELECTOR 304
+#define DEFS 305
+#define ENCODE 306
+#define CLASSNAME 307
+#define PUBLIC 308
+#define PRIVATE 309
+#define PROTECTED 310
+#define PROTOCOL 311
+#define OBJECTNAME 312
+#define CLASS 313
+#define ALIAS 314
+#define OBJC_STRING 315
extern YYSTYPE yylval;

View file

@ -1,126 +0,0 @@
$NetBSD: patch-bq,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/cccp.c.orig 2001/04/23 11:58:03 1.1.1.2
+++ ../gcc-2.95.3/gcc/cccp.c 2001/08/14 01:13:34 1.2
@@ -2779,7 +2779,8 @@
RECACHE;
continue;
}
- if (!traditional) {
+ if (!(traditional || put_out_comments))
+ {
error_with_line (line_for_error (start_line),
"unterminated string or character constant");
if (multiline_string_line) {
@@ -2797,7 +2798,8 @@
++op->lineno;
/* Traditionally, end of line ends a string constant with no error.
So exit the loop and record the new line. */
- if (traditional) {
+ if (traditional || put_out_comments)
+ {
beg_of_line = ibp;
goto while2end;
}
@@ -2868,7 +2870,7 @@
break;
case '/':
- if (ip->macro != 0)
+ if (ip->macro != 0 && put_out_comments == 0)
goto randomchar;
if (*ibp == '\\' && ibp[1] == '\n')
newline_fix (ibp);
@@ -3777,7 +3779,8 @@
limit = ip->buf + ip->length;
unterminated = 0;
already_output = 0;
- keep_comments = traditional && kt->type == T_DEFINE;
+ keep_comments = kt->type == T_DEFINE && (traditional ||
+ put_out_comments);
/* #import is defined only in Objective C, or when on the NeXT. */
if (kt->type == T_IMPORT
&& !(objc || lookup ((U_CHAR *) "__NeXT__", -1, -1)))
@@ -4025,7 +4028,7 @@
while (xp != ip->bufp)
*cp++ = *xp++;
/* Delete or replace the slash. */
- else if (traditional)
+ else if (traditional || put_out_comments)
cp--;
else
cp[-1] = ' ';
@@ -6208,6 +6211,20 @@
stringify = p;
}
break;
+ case '/':
+ if (expected_delimiter != '\0') /* No comments inside strings. */
+ break;
+ if (*p == '*') {
+ while (p < limit) {
+ *exp_p++ = *p++;
+ if (p[0] == '*' && p[1] == '/') {
+ *exp_p++ = *p++;
+ *exp_p++ = *p++;
+ break;
+ }
+ }
+ }
+ break;
}
} else {
/* In -traditional mode, recognize arguments inside strings and
@@ -6240,11 +6257,22 @@
/* If we find a comment that wasn't removed by handle_directive,
this must be -traditional. So replace the comment with
nothing at all. */
- exp_p--;
- while (++p < limit) {
- if (p[0] == '*' && p[1] == '/') {
- p += 2;
- break;
+ if (!put_out_comments) {
+ exp_p--;
+ while (++p < limit) {
+ if (p[0] == '*' && p[1] == '/') {
+ p += 2;
+ break;
+ }
+ }
+ } else {
+ while (p < limit) {
+ *exp_p++ = *p++;
+ if (p[0] == '*' && p[1] == '/') {
+ *exp_p++ = *p++;
+ *exp_p++ = *p++;
+ break;
+ }
}
}
#if 0
@@ -7243,6 +7271,24 @@
pcp_inside_if = 0;
delete_macro (save_defined); /* clean up special symbol */
+ if (put_out_comments) {
+ char *ptr, *eptr = temp_obuf.buf + temp_obuf.length;
+
+ for (ptr = temp_obuf.buf; ptr < eptr; ptr++) {
+ if (*ptr == '/' && ptr + 1 < eptr && ptr[1] == '*') {
+ *ptr++ = ' ';
+ *ptr++ = ' ';
+ while (ptr < eptr) {
+ if (*ptr == '*' && ptr + 1 < eptr && ptr[1] == '/') {
+ *ptr++ = ' ';
+ *ptr++ = ' ';
+ break;
+ } else
+ *ptr++ = ' ';
+ }
+ }
+ }
+ }
temp_obuf.buf[temp_obuf.length] = '\n';
value = parse_c_expression ((char *) temp_obuf.buf,
warn_undef && !instack[indepth].system_header_p);

View file

@ -1,12 +0,0 @@
$NetBSD: patch-br,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/collect2.c.orig 2001/04/23 11:58:04 1.1.1.2
+++ ../gcc-2.95.3/gcc/collect2.c 2001/04/23 12:23:27 1.3
@@ -54,7 +54,6 @@
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-extern char *make_temp_file PROTO ((char *));
/* On certain systems, we have code that works by scanning the object file
directly. But this code uses system-specific header files and library

File diff suppressed because it is too large Load diff

View file

@ -1,247 +0,0 @@
$NetBSD: patch-bt,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/configure.in.orig 2001/04/23 11:58:07 1.1.1.2
+++ ../gcc-2.95.3/gcc/configure.in 2002/03/24 18:05:57 1.18
@@ -498,7 +498,9 @@
hppa*-*-*)
cpu_type=pa
;;
- m68000-*-*)
+changequote(,)dnl
+ m680[01]0-*-*)
+changequote([,])dnl
cpu_type=m68k
;;
mips*-*-*)
@@ -510,6 +512,9 @@
pyramid-*-*)
cpu_type=pyr
;;
+ sh*-*-*)
+ cpu_type=sh
+ ;;
sparc*-*-*)
cpu_type=sparc
;;
@@ -518,11 +523,20 @@
tm_file=${cpu_type}/${cpu_type}.h
xm_file=${cpu_type}/xm-${cpu_type}.h
- # Common parts for linux-gnu and openbsd systems
+ # Common parts for some multiplatform systems
case $machine in
*-*-linux-gnu*)
xm_defines="HAVE_ATEXIT POSIX BSTRING"
;;
+ *-*-netbsd*)
+ case $machine in
+ *-*-netbsdelf*) tm_file=${cpu_type}/netbsd-elf.h;;
+ *) tm_file=${cpu_type}/netbsd.h;;
+ esac
+ tmake_file="t-libc-ok t-netbsd"
+ xm_file="${xm_file} xm-netbsd.h"
+ xmake_file=none
+ ;;
*-*-openbsd*)
tm_file=${cpu_type}/openbsd.h
tmake_file="t-libc-ok t-openbsd"
@@ -626,20 +640,15 @@
fi
;;
alpha*-*-netbsd*)
- tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
target_cpu_default="MASK_GAS"
- tmake_file="alpha/t-crtbe alpha/t-ieee"
- extra_parts="crtbegin.o crtend.o"
- xmake_file=none
+ tmake_file="${tmake_file} alpha/t-ieee"
gas=yes gnu_ld=yes
;;
-
alpha*-*-openbsd*)
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
tmake_file="alpha/t-ieee"
;;
-
alpha*-dec-osf*)
if test x$stabs = xyes
then
@@ -742,11 +751,12 @@
tm_file=arm/semiaof.h
tmake_file=arm/t-semiaof
;;
- arm*-*-netbsd*)
- tm_file=arm/netbsd.h
+ arm*-*-netbsdelf*)
xm_file="arm/xm-netbsd.h ${xm_file}"
- tmake_file="t-netbsd arm/t-netbsd"
- use_collect2=yes
+ gas=yes gnu_ld=yes
+ ;;
+ arm*-*-netbsd*)
+ gas=yes
;;
arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out
cpu_type=arm
@@ -1171,11 +1181,13 @@
tmake_file=t-freebsd
;;
changequote(,)dnl
+ i[34567]86-*-netbsdelf*)
+changequote([,])dnl
+ gas=yes gnu_ld=yes
+ ;;
+changequote(,)dnl
i[34567]86-*-netbsd*)
changequote([,])dnl
- tm_file=i386/netbsd.h
- tmake_file=t-netbsd
- use_collect2=yes
;;
changequote(,)dnl
i[34567]86-*-openbsd*)
@@ -2043,12 +2055,21 @@
tmake_file=m68k/t-lynx
extra_headers=math-68881.h
float_format=m68k
+ ;;
+ m68*-*-netbsdelf*)
+ case $machine in
+ m68010-*)
+ target_cpu_default="0"
+ ;;
+ *)
+ target_cpu_default="MASK_68020|MASK_68881|MASK_BITFIELD"
+ ;;
+ esac
+ float_format=m68k
+ gas=yes gnu_ld=yes
;;
- m68k*-*-netbsd*)
- tm_file=m68k/netbsd.h
- tmake_file=t-netbsd
+ m68*-*-netbsd*)
float_format=m68k
- use_collect2=yes
;;
m68k*-*-openbsd*)
float_format=m68k
@@ -2363,10 +2384,12 @@
use_collect2=yes
fi
;;
- mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
- tm_file=mips/netbsd.h
- # On NetBSD, the headers are already okay, except for math.h.
- tmake_file=t-netbsd
+ mipseb*-*-netbsd*)
+ tmake_file="${tmake_file} mips/t-mipseb"
+ gas=yes gnu_ld=yes
+ ;;
+ mips*-*-netbsd*)
+ gas=yes gnu_ld=yes
;;
mips*-*-linux*) # Linux MIPS, either endian.
xmake_file=x-linux
@@ -2724,11 +2747,6 @@
use_collect2=yes
;;
ns32k-*-netbsd*)
- tm_file=ns32k/netbsd.h
- xm_file="ns32k/xm-netbsd.h ${xm_file}"
- # On NetBSD, the headers are already okay, except for math.h.
- tmake_file=t-netbsd
- use_collect2=yes
;;
pdp11-*-bsd)
tm_file="${tm_file} pdp11/2bsd.h"
@@ -2753,6 +2771,10 @@
romp-*-openbsd*)
# Nothing special
;;
+ powerpc-*-netbsd*)
+ tmake_file="${tmake_file} rs6000/t-rs6000"
+ xm_file="rs6000/xm-sysv4.h xm-netbsd.h"
+ ;;
powerpc-*-openbsd*)
tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
;;
@@ -3005,6 +3027,13 @@
tm_file=sh/elf.h
float_format=sh
;;
+ sh-*-netbsdelf*)
+ float_format=sh
+ ;;
+ shle-*-netbsdelf*)
+ tm_file="sh/netbsd-elf.h sh/netbsd-elf-little.h"
+ float_format=sh;
+ ;;
sh-*-rtemself*)
tmake_file="sh/t-sh t-rtems"
tm_file=sh/rtemself.h
@@ -3033,10 +3062,12 @@
tmake_file=sparc/t-sparcbare
tm_file="sparc/aout.h libgloss.h"
;;
+ sparc-*-netbsdelf*)
+ tmake_file="${tmake_file} sparc/t-netbsd"
+ gas=yes gnu_ld=yes
+ ;;
sparc-*-netbsd*)
- tm_file=sparc/netbsd.h
- tmake_file=t-netbsd
- use_collect2=yes
+ tmake_file="${tmake_file} sparc/t-netbsd"
;;
sparc-*-openbsd*)
# we need collect2 until our bug is fixed...
@@ -3228,6 +3259,11 @@
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes
;;
+ sparc64-*-netbsd*)
+ tm_file=sparc/netbsd64.h
+ xm_file="sparc/xm-sp64.h xm-netbsd.h"
+ gas=yes gnu_ld=yes
+ ;;
# This hasn't been upgraded to GCC 2.
# tahoe-harris-*) # Harris tahoe, using COFF.
# tm_file=tahoe/harris.h
@@ -3275,10 +3311,8 @@
float_format=vax
;;
vax-*-netbsd*)
- tm_file="${tm_file} netbsd.h vax/netbsd.h"
- tmake_file=t-netbsd
float_format=vax
- use_collect2=yes
+ gas=yes gnu_ld=yes
;;
vax-*-openbsd*)
tmake_file="${tmake_file} vax/t-openbsd"
@@ -3569,6 +3603,12 @@
esac
fi
+case $target in
+ alpha*|sparc64*)
+ build_xm_file="${build_xm_file} xm-target64.h"
+ host_xm_file="${host_xm_file} xm-target64.h";;
+esac
+
# Handle cpp installation.
if test x$enable_cpp != xno
then
@@ -3655,8 +3695,8 @@
/*) realsrcdir=${srcdir};;
*) realsrcdir=../${srcdir};;
esac
- CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
- --target=$target --host=$build --build=$build
+ CC=${CC_FOR_BUILD} LIBS= ${realsrcdir}/configure \
+ --target=$target --host=$build --build=$build || exit 1
# We just finished tests for the build machine, so rename
# the file auto-build.h in the gcc directory.

View file

@ -1,16 +0,0 @@
$NetBSD: patch-bu,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/cppspec.c.orig 2000/07/26 00:17:25 1.1.1.1
+++ ../gcc-2.95.3/gcc/cppspec.c 2001/08/14 13:46:14 1.2
@@ -85,7 +85,11 @@
int need_E = 1;
/* Do we need to insert -no-gcc? */
+#if 0
int need_no_gcc = 1;
+#endif
+ /* XXX - For NetBSD backwards compatibility */
+ int need_no_gcc = 0;
/* Have we seen an input file? */
int seen_input = 0;

View file

@ -1,12 +0,0 @@
$NetBSD: patch-bv,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/dwarf2out.c.orig 2001/04/23 11:58:11 1.1.1.2
+++ ../gcc-2.95.3/gcc/dwarf2out.c 2001/12/07 02:40:36 1.2
@@ -1801,6 +1801,7 @@
}
fputc ('\n', asm_out_file);
+ ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
ASM_OUTPUT_DWARF_ADDR (asm_out_file, "__EXCEPTION_TABLE__");
if (flag_debug_asm)
fprintf (asm_out_file, "\t%s pointer to exception region info",

View file

@ -1,20 +0,0 @@
$NetBSD: patch-bw,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/emit-rtl.c.orig 2001/04/23 11:58:12 1.1.1.2
+++ ../gcc-2.95.3/gcc/emit-rtl.c 2001/04/23 12:23:27 1.3
@@ -1382,6 +1382,15 @@
val = ((val & 0xffffffff) ^ 0x80000000) - 0x80000000;
return GEN_INT (val);
}
+#if HOST_BITS_PER_WIDE_INT >= 64
+ else if (BITS_PER_WORD >= 64 && i <= 1)
+ {
+ val = k[i*2 + ! WORDS_BIG_ENDIAN];
+ val = (((val & 0xffffffff) ^ 0x80000000) - 0x80000000) << 32;
+ val |= (HOST_WIDE_INT) k[i*2 + WORDS_BIG_ENDIAN] & 0xffffffff;
+ return GEN_INT (val);
+ }
+#endif
else
abort ();
}

View file

@ -1,23 +0,0 @@
$NetBSD: patch-bx,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/frame.c.orig 2001/04/23 11:58:18 1.1.1.2
+++ ../gcc-2.95.3/gcc/frame.c 2001/12/07 02:41:13 1.3
@@ -40,6 +40,7 @@
#ifndef inhibit_libc
/* fixproto guarantees these system headers exist. */
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#endif
@@ -572,6 +573,10 @@
if (strcmp (c->augmentation, "eh") == 0)
{
+ /* Handle the blank space > 4 byte alignment may have forced. */
+ if (sizeof(void *) > 4)
+ p += (sizeof(void *) - 4);
+
c->eh_ptr = read_pointer (p);
p += sizeof (void *);
}

View file

@ -1,81 +0,0 @@
$NetBSD: patch-by,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/gcc.c.orig 2001/04/23 11:58:19 1.1.1.2
+++ ../gcc-2.95.3/gcc/gcc.c 2001/08/14 13:36:10 1.2
@@ -3057,6 +3057,7 @@
(such as cpp) rather than those of the host system. */
/* Use 2 as fourth arg meaning try just the machine as a suffix,
as well as trying the machine and the version. */
+#ifndef NETBSD_NATIVE
#ifndef OS2
add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
0, 2, warn_std_ptr);
@@ -3108,6 +3109,7 @@
add_prefix (&startfile_prefixes,
concat (tooldir_prefix, "lib", dir_separator_str, NULL_PTR),
"BINUTILS", 0, 0, NULL_PTR);
+#endif
/* More prefixes are enabled in main, after we read the specs file
and determine whether this is cross-compilation or not. */
@@ -4796,9 +4798,11 @@
/* Read specs from a file if there is one. */
+#ifndef NETBSD_NATIVE
machine_suffix = concat (spec_machine, dir_separator_str,
spec_version, dir_separator_str, NULL_PTR);
just_machine_suffix = concat (spec_machine, dir_separator_str, NULL_PTR);
+#endif
specs_file = find_a_file (&startfile_prefixes, "specs", R_OK);
/* Read the specs file unless it is a default one. */
@@ -4807,6 +4811,7 @@
else
init_spec ();
+#ifndef NETBSD_NATIVE
/* We need to check standard_exec_prefix/just_machine_suffix/specs
for any override of as, ld and libraries. */
specs_file = (char *) alloca (strlen (standard_exec_prefix)
@@ -4818,14 +4823,17 @@
strcat (specs_file, "specs");
if (access (specs_file, R_OK) == 0)
read_specs (specs_file, TRUE);
+#endif
/* If not cross-compiling, look for startfiles in the standard places. */
if (*cross_compile == '0')
{
#ifdef MD_EXEC_PREFIX
add_prefix (&exec_prefixes, md_exec_prefix, "GCC", 0, 0, NULL_PTR);
+#ifndef NETBSD_NATIVE
add_prefix (&startfile_prefixes, md_exec_prefix, "GCC", 0, 0, NULL_PTR);
#endif
+#endif
#ifdef MD_STARTFILE_PREFIX
add_prefix (&startfile_prefixes, md_startfile_prefix, "GCC",
@@ -4865,10 +4873,12 @@
NULL_PTR, 0, 0, NULL_PTR);
}
+#ifndef NETBSD_NATIVE
add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
"BINUTILS", 0, 0, NULL_PTR);
add_prefix (&startfile_prefixes, standard_startfile_prefix_2,
"BINUTILS", 0, 0, NULL_PTR);
+#endif
#if 0 /* Can cause surprises, and one can use -B./ instead. */
add_prefix (&startfile_prefixes, "./", NULL_PTR, 0, 1, NULL_PTR);
#endif
@@ -4923,7 +4933,9 @@
if (print_search_dirs)
{
+#ifndef NETBSD_NATIVE
printf ("install: %s%s\n", standard_exec_prefix, machine_suffix);
+#endif
printf ("programs: %s\n", build_search_list (&exec_prefixes, "", 0));
printf ("libraries: %s\n", build_search_list (&startfile_prefixes, "", 0));
exit (0);

View file

@ -1,12 +0,0 @@
$NetBSD: patch-bz,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/libgcc2.c.orig 2000/07/26 00:17:35 1.1.1.1
+++ ../gcc-2.95.3/gcc/libgcc2.c 2001/10/05 07:04:04 1.2
@@ -39,6 +39,7 @@
#ifndef inhibit_libc
/* fixproto guarantees these system headers exist. */
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#endif

View file

@ -1,21 +0,0 @@
$NetBSD: patch-ca,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/loop.c.orig 2001/04/23 11:58:27 1.1.1.2
+++ ../gcc-2.95.3/gcc/loop.c 2001/12/06 18:50:34 1.2
@@ -4103,11 +4103,11 @@
in-between when biv_toal_increment returns nonzero both times
but we test it here in case some day some real cfg analysis
gets used to set always_computable. */
- && ((loop_insn_first_p (bl2->biv->insn, bl->biv->insn)
- && no_labels_between_p (bl2->biv->insn, bl->biv->insn))
- || (! reg_used_between_p (bl->biv->src_reg, bl->biv->insn,
- bl2->biv->insn)
- && no_jumps_between_p (bl->biv->insn, bl2->biv->insn)))
+ && (loop_insn_first_p (bl2->biv->insn, bl->biv->insn)
+ ? no_labels_between_p (bl2->biv->insn, bl->biv->insn)
+ : (! reg_used_between_p (bl->biv->src_reg, bl->biv->insn,
+ bl2->biv->insn)
+ && no_jumps_between_p (bl->biv->insn, bl2->biv->insn)))
&& validate_change (bl->biv->insn,
&SET_SRC (single_set (bl->biv->insn)),
copy_rtx (src), 0))

View file

@ -1,13 +0,0 @@
$NetBSD: patch-cb,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/reload1.c.orig 2001/04/23 11:58:33 1.1.1.2
+++ ../gcc-2.95.3/gcc/reload1.c 2001/06/01 02:42:26 1.2
@@ -1277,7 +1277,7 @@
/* Get the operand values and constraints out of the insn. */
decode_asm_operands (pat, recog_operand, recog_operand_loc,
- constraints, operand_mode);
+ (const char **)constraints, operand_mode);
/* For every operand, see what registers are allowed. */
for (i = 0; i < noperands; i++)

View file

@ -1,20 +0,0 @@
$NetBSD: patch-cc,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/tm.texi.orig 2000/07/26 00:17:43 1.1.1.1
+++ ../gcc-2.95.3/gcc/tm.texi 2001/03/06 05:21:47 1.2
@@ -5598,6 +5598,15 @@
If this macro is not defined, then the variable name is defined in the
usual manner as a label (by means of @code{ASM_OUTPUT_LABEL}).
+@findex ASM_DECLARE_REGISTER_GLOBAL
+@item ASM_DECLARE_REGISTER_GLOBAL (@var{stream}, @var{decl}, @var{regno}, @var{name})
+A C statement (sans semicolon) to output to the stdio stream
+@var{stream} any text necessary for claiming a register @var{regno}
+for a global variable @var{decl} with name @var{name}.
+
+If you don't define this macro, that is equivalent to defining it to do
+nothing.
+
@findex ASM_FINISH_DECLARE_OBJECT
@item ASM_FINISH_DECLARE_OBJECT (@var{stream}, @var{decl}, @var{toplevel}, @var{atend})
A C statement (sans semicolon) to finish up declaring a variable name

View file

@ -1,14 +0,0 @@
$NetBSD: patch-cd,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/varasm.c.orig 2001/04/23 11:58:40 1.1.1.2
+++ ../gcc-2.95.3/gcc/varasm.c 2001/04/23 12:23:27 1.3
@@ -706,6 +706,9 @@
{
/* Make this register global, so not usable for anything
else. */
+#ifdef ASM_DECLARE_REGISTER_GLOBAL
+ ASM_DECLARE_REGISTER_GLOBAL (asm_out_file, decl, reg_number, name);
+#endif
nregs = HARD_REGNO_NREGS (reg_number, DECL_MODE (decl));
while (nregs > 0)
globalize_reg (reg_number + --nregs);

View file

@ -1,7 +0,0 @@
$NetBSD: patch-ce,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/gcc/version.c.orig 2001/04/23 11:58:41 1.1.1.2
+++ ../gcc-2.95.3/gcc/version.c 2001/12/19 21:32:51 1.2
@@ -1 +1 @@
-char *version_string = "2.95.3 20010315 (release)";
+char *version_string = "2.95.3 20010315 (release) (NetBSD nb1)";

View file

@ -1,12 +0,0 @@
$NetBSD: patch-cf,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/libf2c/libU77/hostnm_.c.orig 2000/07/26 00:19:25 1.1.1.1
+++ ../gcc-2.95.3/libf2c/libU77/hostnm_.c 2001/05/30 07:02:39 1.2
@@ -36,6 +36,7 @@
#if HAVE_GETHOSTNAME
ret = gethostname (name, Lname);
+ name[Lname - 1] = '\0';
if (ret==0) {
/* Pad with blanks (assuming gethostname will make an error
return if it can't fit in the null). */

View file

@ -1,13 +0,0 @@
$NetBSD: patch-cg,v 1.2 2002/03/28 10:11:54 jmc Exp $
--- ../gcc-2.95.3/libio/Makefile.in.orig 2000/07/26 00:19:30 1.1.1.1
+++ ../gcc-2.95.3/libio/Makefile.in 2001/12/19 21:32:50 1.2
@@ -17,7 +17,7 @@
srcdir = .
-VERSION = 2.8.0
+VERSION = 2.8.0nb1
# The config file (overriden by Linux).
_G_CONFIG_H=_G_config.h
tooldir = $(exec_prefix)/$(target)

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ch,v 1.2 2002/03/28 10:11:55 jmc Exp $
--- ../gcc-2.95.3/libio/iopopen.c.orig 2000/07/26 00:19:32 1.1.1.1
+++ ../gcc-2.95.3/libio/iopopen.c 2001/07/26 17:18:39 1.2
@@ -31,7 +31,7 @@
#ifdef __STDC__
#include <stdlib.h>
#endif
-#ifdef _LIBC
+#if defined(_LIBC) || defined(__NetBSD__)
# include <unistd.h>
#endif
#include <sys/types.h>

View file

@ -1,12 +0,0 @@
$NetBSD: patch-ci,v 1.2 2002/03/28 10:11:55 jmc Exp $
--- ../gcc-2.95.3/libobjc/objc/runtime.h.orig 2000/07/26 00:19:41 1.1.1.1
+++ ../gcc-2.95.3/libobjc/objc/runtime.h 2001/01/31 15:22:51 1.2
@@ -29,6 +29,7 @@
#include <stdarg.h> /* for varargs and va_list's */
#include <stdio.h>
+#include <string.h>
#include <ctype.h>
#include <stddef.h> /* so noone else will get system versions */

View file

@ -1,15 +0,0 @@
$NetBSD: patch-cj,v 1.2 2002/03/28 10:11:55 jmc Exp $
--- ../gcc-2.95.3/libobjc/Object.m.orig 2000/07/26 00:19:39 1.1.1.1
+++ ../gcc-2.95.3/libobjc/Object.m 2001/10/05 07:38:22 1.2
@@ -320,9 +320,8 @@
object_get_class_name(self), sel_get_name(aSel)];
}
-#ifdef __alpha__
+/* XXX Why not just include <string.h>? */
extern size_t strlen(const char*);
-#endif
- error:(const char *)aString, ...
{

View file

@ -1,17 +0,0 @@
$NetBSD: patch-ck,v 1.2 2002/03/28 10:11:55 jmc Exp $
--- ../gcc-2.95.3/libstdc++/stl/stl_alloc.h.orig 2000/07/26 00:19:47 1.1.1.1
+++ ../gcc-2.95.3/libstdc++/stl/stl_alloc.h 2001/05/30 10:51:55 1.2
@@ -1050,6 +1050,12 @@
#undef __PRIVATE
+#ifdef __GNUG__
+// instantiated in stlinst.cc
+extern template __malloc_alloc_template<0>;
+extern template __default_alloc_template<__NODE_ALLOCATOR_THREADS, 0>;
+#endif
+
#endif /* __SGI_STL_INTERNAL_ALLOC_H */
// Local Variables:

View file

@ -1,13 +0,0 @@
$NetBSD: patch-cl,v 1.2 2002/03/28 10:11:55 jmc Exp $
--- ../gcc-2.95.3/libstdc++/Makefile.in.orig 2001/04/23 12:02:01 1.1.1.2
+++ ../gcc-2.95.3/libstdc++/Makefile.in 2001/12/19 21:32:50 1.2
@@ -14,7 +14,7 @@
# along with this library; see the file COPYING. If not, write to the Free
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-VERSION = 2.10.0
+VERSION = 2.10.0nb1
INTERFACE = 3
gxx_include_dir=${includedir}/g++

View file

@ -1,13 +0,0 @@
$NetBSD: patch-cm,v 1.2 2002/03/28 10:11:55 jmc Exp $
--- ../gcc-2.95.3/texinfo/configure.orig 2000/07/26 00:19:50 1.1.1.1
+++ ../gcc-2.95.3/texinfo/configure 2001/12/19 21:32:50 1.2
@@ -707,7 +707,7 @@
PACKAGE=texinfo
-VERSION=3.12
+VERSION=3.12nb1
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }

View file

@ -1,35 +0,0 @@
$NetBSD: patch-cn,v 1.3 2002/03/28 10:11:55 jmc Exp $
--- ../gcc-2.95.3/gcc/config/arm/xm-netbsd.h.orig 2000/07/26 00:18:17 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/arm/xm-netbsd.h 2002/03/24 18:05:58 1.3
@@ -1,5 +1,27 @@
-/* Configuration for GCC for ARM running NetBSD as host. */
+/* Configuration for GCC for ARM running NetBSD.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Wasabi Systems, Inc.
-#ifndef SYS_SIGLIST_DECLARED
-#define SYS_SIGLIST_DECLARED
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* ARM ELF uses packed enums, so we need to make sure bitfields
+ that use them are ints, so that the bitfield doesn't exceed
+ the width of the type. */
+#ifndef ONLY_INT_FIELDS
+#define ONLY_INT_FIELDS
#endif

View file

@ -1,24 +0,0 @@
$NetBSD: patch-co,v 1.1 2002/03/28 10:11:55 jmc Exp $
--- ../gcc-2.95.3/gcc/config/mips/mips.h.orig 2000/07/26 00:18:38 1.1.1.1
+++ ../gcc-2.95.3/gcc/config/mips/mips.h 2002/01/04 05:29:39 1.2
@@ -2606,18 +2606,16 @@
{ \
if (TARGET_MIPS16) \
sorry ("mips16 function profiling"); \
- fprintf (FILE, "\t.set\tnoreorder\n"); \
fprintf (FILE, "\t.set\tnoat\n"); \
fprintf (FILE, "\tmove\t%s,%s\t\t# save current return address\n", \
reg_names[GP_REG_FIRST + 1], reg_names[GP_REG_FIRST + 31]); \
- fprintf (FILE, "\tjal\t_mcount\n"); \
fprintf (FILE, \
"\t%s\t%s,%s,%d\t\t# _mcount pops 2 words from stack\n", \
TARGET_64BIT ? "dsubu" : "subu", \
reg_names[STACK_POINTER_REGNUM], \
reg_names[STACK_POINTER_REGNUM], \
Pmode == DImode ? 16 : 8); \
- fprintf (FILE, "\t.set\treorder\n"); \
+ fprintf (FILE, "\tjal\t_mcount\n"); \
fprintf (FILE, "\t.set\tat\n"); \
}

File diff suppressed because it is too large Load diff