mirror of
https://github.com/pmret/gcc-papermario.git
synced 2024-11-09 12:22:38 +01:00
Applied 'gcc-2.8.1-with-naked.diff'
This commit is contained in:
parent
57261bd1c1
commit
253149a88a
@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
#include "machmode.h"
|
#include "machmode.h"
|
||||||
#include "rtl.h"
|
#include "rtl.h"
|
||||||
|
2
c-decl.c
2
c-decl.c
@ -1406,7 +1406,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
|
|||||||
char *errmsg = 0;
|
char *errmsg = 0;
|
||||||
|
|
||||||
if (TREE_CODE_CLASS (TREE_CODE (olddecl)) == 'd')
|
if (TREE_CODE_CLASS (TREE_CODE (olddecl)) == 'd')
|
||||||
DECL_MACHINE_ATTRIBUTES (newdecl) = DECL_MACHINE_ATTRIBUTES (olddecl);
|
DECL_MACHINE_ATTRIBUTES (newdecl) = merge_attributes(DECL_MACHINE_ATTRIBUTES (olddecl), DECL_MACHINE_ATTRIBUTES (newdecl));
|
||||||
|
|
||||||
if (TREE_CODE (newtype) == ERROR_MARK
|
if (TREE_CODE (newtype) == ERROR_MARK
|
||||||
|| TREE_CODE (oldtype) == ERROR_MARK)
|
|| TREE_CODE (oldtype) == ERROR_MARK)
|
||||||
|
@ -165,7 +165,7 @@ static struct resword wordlist[] =
|
|||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
inline
|
inline
|
||||||
#endif
|
#endif
|
||||||
struct resword *
|
static struct resword *
|
||||||
is_reserved_word (str, len)
|
is_reserved_word (str, len)
|
||||||
register char *str;
|
register char *str;
|
||||||
register unsigned int len;
|
register unsigned int len;
|
||||||
|
2
calls.c
2
calls.c
@ -28,7 +28,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
#include "insn-flags.h"
|
#include "insn-flags.h"
|
||||||
|
|
||||||
|
133
cccp.c
133
cccp.c
@ -109,7 +109,7 @@ extern char *getenv ();
|
|||||||
# define PRINTF_DCL(msg)
|
# define PRINTF_DCL(msg)
|
||||||
# define PRINTF_PROTO(ARGS, m, n) PROTO (ARGS) __attribute__ ((format (__printf__, m, n)))
|
# define PRINTF_PROTO(ARGS, m, n) PROTO (ARGS) __attribute__ ((format (__printf__, m, n)))
|
||||||
#else
|
#else
|
||||||
# include <varargs.h>
|
# include <stdarg.h>
|
||||||
# define PRINTF_ALIST(msg) msg, va_alist
|
# define PRINTF_ALIST(msg) msg, va_alist
|
||||||
# define PRINTF_DCL(msg) char *msg; va_dcl
|
# define PRINTF_DCL(msg) char *msg; va_dcl
|
||||||
# define PRINTF_PROTO(ARGS, m, n) () __attribute__ ((format (__printf__, m, n)))
|
# define PRINTF_PROTO(ARGS, m, n) () __attribute__ ((format (__printf__, m, n)))
|
||||||
@ -1163,6 +1163,42 @@ safe_read (desc, ptr, len)
|
|||||||
retrying if necessary, and treating any real error as fatal.
|
retrying if necessary, and treating any real error as fatal.
|
||||||
If MAX_WRITE_LEN is defined, write at most that many bytes at a time. */
|
If MAX_WRITE_LEN is defined, write at most that many bytes at a time. */
|
||||||
|
|
||||||
|
#ifdef NU64
|
||||||
|
enum { KANJI_OFF = 0, KANJI_SJIS, KANJI_EUC };
|
||||||
|
static n64kanji_flag = KANJI_OFF; /* by default, KANJI OFF mode */
|
||||||
|
#define KANJIENV "N64GCC_KANJI"
|
||||||
|
static void
|
||||||
|
kanjienv_check ()
|
||||||
|
{
|
||||||
|
char *n64kanji_env;
|
||||||
|
n64kanji_env = getenv("N64GCC_KANJI");
|
||||||
|
if ( !strcasecmp( n64kanji_env, "SJIS" ) ) {
|
||||||
|
n64kanji_flag = KANJI_SJIS;
|
||||||
|
} else if ( !strcasecmp( n64kanji_env, "EUC" ) ) {
|
||||||
|
n64kanji_flag = KANJI_EUC;
|
||||||
|
} else if ( !strcasecmp( n64kanji_env, "OFF" ) ) {
|
||||||
|
n64kanji_flag = KANJI_OFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
iskanji1( c )
|
||||||
|
U_CHAR c;
|
||||||
|
{
|
||||||
|
switch ( n64kanji_flag ) {
|
||||||
|
case KANJI_OFF:
|
||||||
|
return 0;
|
||||||
|
case KANJI_EUC:
|
||||||
|
return (c >= 0xa1 && c <= 0xfe);
|
||||||
|
case KANJI_SJIS:
|
||||||
|
default:
|
||||||
|
return (c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* NU64 */
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
safe_write (desc, ptr, len)
|
safe_write (desc, ptr, len)
|
||||||
int desc;
|
int desc;
|
||||||
@ -1171,6 +1207,39 @@ safe_write (desc, ptr, len)
|
|||||||
{
|
{
|
||||||
int wcount, written;
|
int wcount, written;
|
||||||
|
|
||||||
|
#ifdef NU64
|
||||||
|
U_CHAR *rptr, *wbuf, *wptr;
|
||||||
|
int tlen, rlen = len;
|
||||||
|
|
||||||
|
if(n64kanji_flag != KANJI_OFF) {
|
||||||
|
rptr = ptr, wptr = NULL;
|
||||||
|
while(rlen--) {
|
||||||
|
U_CHAR c = *rptr++;
|
||||||
|
if (wptr) {
|
||||||
|
int wlen = wptr - wbuf;
|
||||||
|
if (tlen <= wlen + 8) {
|
||||||
|
wbuf = (char *)realloc(wbuf, tlen += 0x1000);
|
||||||
|
wptr = wbuf + wlen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( iskanji1( c ) ) {
|
||||||
|
if (!wptr) {
|
||||||
|
wbuf = (char *)malloc(tlen = len + 0x1000);
|
||||||
|
memcpy(wbuf, ptr, len - rlen -1);
|
||||||
|
wptr = wbuf + len - rlen - 1;
|
||||||
|
}
|
||||||
|
sprintf(wptr, "\\%03o", c), wptr += 4;
|
||||||
|
if (rlen--) sprintf(wptr, "\\%03o", *rptr++), wptr += 4;
|
||||||
|
} else {
|
||||||
|
if (wptr) *wptr++ = c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (wptr) {
|
||||||
|
ptr = wbuf;
|
||||||
|
len = wptr - wbuf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
wcount = len;
|
wcount = len;
|
||||||
#ifdef MAX_WRITE_LEN
|
#ifdef MAX_WRITE_LEN
|
||||||
@ -1191,6 +1260,31 @@ safe_write (desc, ptr, len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NU64
|
||||||
|
void
|
||||||
|
nu64cutcr(bufp, lenp)
|
||||||
|
char **bufp;
|
||||||
|
int *lenp;
|
||||||
|
{
|
||||||
|
char *wptr, *rptr, *n64cutcr_env;
|
||||||
|
int wsize = *lenp;
|
||||||
|
static n64cutcr_flag = -1;
|
||||||
|
|
||||||
|
if (n64cutcr_flag == -1) {
|
||||||
|
n64cutcr_env = getenv("N64GCC_CUTCR");
|
||||||
|
n64cutcr_flag = (n64cutcr_env && !strcasecmp(n64cutcr_env, "ON") ? 1:0);
|
||||||
|
}
|
||||||
|
if (n64cutcr_flag) {
|
||||||
|
wptr = rptr = *bufp;
|
||||||
|
while(wsize--) {
|
||||||
|
if (*rptr == 0x0d && rptr[1] == 0x0a && wsize) rptr++, wsize--, (*lenp)--;
|
||||||
|
*wptr++ = *rptr++;
|
||||||
|
}
|
||||||
|
if ((*bufp)[(*lenp)-1] == 0x1a) (*bufp)[--(*lenp)] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main (argc, argv)
|
main (argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
@ -1876,6 +1970,10 @@ main (argc, argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NU64
|
||||||
|
kanjienv_check();
|
||||||
|
#endif
|
||||||
|
|
||||||
append_include_chain (before_system, last_before_system);
|
append_include_chain (before_system, last_before_system);
|
||||||
first_system_include = before_system;
|
first_system_include = before_system;
|
||||||
|
|
||||||
@ -2107,6 +2205,9 @@ main (argc, argv)
|
|||||||
fp->buf = (U_CHAR *) xrealloc (fp->buf, bsize + 2);
|
fp->buf = (U_CHAR *) xrealloc (fp->buf, bsize + 2);
|
||||||
}
|
}
|
||||||
fp->length = size;
|
fp->length = size;
|
||||||
|
#ifdef NU64
|
||||||
|
nu64cutcr(&fp->buf, &fp->length);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
/* Read a file whose size we can determine in advance.
|
/* Read a file whose size we can determine in advance.
|
||||||
For the sake of VMS, st.st_size is just an upper bound. */
|
For the sake of VMS, st.st_size is just an upper bound. */
|
||||||
@ -2116,6 +2217,9 @@ main (argc, argv)
|
|||||||
fp->buf = (U_CHAR *) xmalloc (s + 2);
|
fp->buf = (U_CHAR *) xmalloc (s + 2);
|
||||||
fp->length = safe_read (f, (char *) fp->buf, s);
|
fp->length = safe_read (f, (char *) fp->buf, s);
|
||||||
if (fp->length < 0) goto perror;
|
if (fp->length < 0) goto perror;
|
||||||
|
#ifdef NU64
|
||||||
|
nu64cutcr(&fp->buf, &fp->length);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
fp->bufp = fp->buf;
|
fp->bufp = fp->buf;
|
||||||
fp->if_stack = if_stack;
|
fp->if_stack = if_stack;
|
||||||
@ -2788,6 +2892,12 @@ do { ip = &instack[indepth]; \
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*obp++ = *ibp;
|
*obp++ = *ibp;
|
||||||
|
#ifdef NU64
|
||||||
|
if ( iskanji1(*ibp) ) {
|
||||||
|
ibp++, *obp++ = *ibp++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
switch (*ibp++) {
|
switch (*ibp++) {
|
||||||
case '\n':
|
case '\n':
|
||||||
++ip->lineno;
|
++ip->lineno;
|
||||||
@ -2870,7 +2980,11 @@ do { ip = &instack[indepth]; \
|
|||||||
|
|
||||||
while (++ibp < limit) {
|
while (++ibp < limit) {
|
||||||
if (*ibp == '\n') {
|
if (*ibp == '\n') {
|
||||||
|
#ifdef NU64
|
||||||
|
if (ibp[-1] != '\\' || iskanji1( ibp[-2] )) {
|
||||||
|
#else
|
||||||
if (ibp[-1] != '\\') {
|
if (ibp[-1] != '\\') {
|
||||||
|
#endif
|
||||||
if (put_out_comments) {
|
if (put_out_comments) {
|
||||||
bcopy ((char *) before_bp, (char *) obp, ibp - before_bp);
|
bcopy ((char *) before_bp, (char *) obp, ibp - before_bp);
|
||||||
obp += ibp - before_bp;
|
obp += ibp - before_bp;
|
||||||
@ -3352,7 +3466,12 @@ randomchar:
|
|||||||
} else if (! traditional) {
|
} else if (! traditional) {
|
||||||
*obp++ = ' ';
|
*obp++ = ' ';
|
||||||
}
|
}
|
||||||
|
#ifdef NU64
|
||||||
|
for (ibp += 2; *ibp != '\n' || ibp[-1] == '\\' ||
|
||||||
|
!iskanji1( ibp[-2] ); ibp++)
|
||||||
|
#else
|
||||||
for (ibp += 2; *ibp != '\n' || ibp[-1] == '\\'; ibp++)
|
for (ibp += 2; *ibp != '\n' || ibp[-1] == '\\'; ibp++)
|
||||||
|
#endif
|
||||||
if (put_out_comments)
|
if (put_out_comments)
|
||||||
*obp++ = *ibp;
|
*obp++ = *ibp;
|
||||||
} else
|
} else
|
||||||
@ -5057,6 +5176,9 @@ finclude (f, inc, op, system_header_p, dirptr)
|
|||||||
on the number of bytes we can read. */
|
on the number of bytes we can read. */
|
||||||
fp->length = safe_read (f, (char *) fp->buf, s);
|
fp->length = safe_read (f, (char *) fp->buf, s);
|
||||||
if (fp->length < 0) goto nope;
|
if (fp->length < 0) goto nope;
|
||||||
|
#ifdef NU64
|
||||||
|
nu64cutcr(&fp->buf, &fp->length);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (S_ISDIR (inc->st.st_mode)) {
|
else if (S_ISDIR (inc->st.st_mode)) {
|
||||||
error ("directory `%s' specified in #include", fname);
|
error ("directory `%s' specified in #include", fname);
|
||||||
@ -5084,6 +5206,9 @@ finclude (f, inc, op, system_header_p, dirptr)
|
|||||||
}
|
}
|
||||||
fp->bufp = fp->buf;
|
fp->bufp = fp->buf;
|
||||||
fp->length = st_size;
|
fp->length = st_size;
|
||||||
|
#ifdef NU64
|
||||||
|
nu64cutcr(&fp->buf, &fp->length);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fp->length > 0 && fp->buf[fp->length - 1] != '\n')
|
if ((fp->length > 0 && fp->buf[fp->length - 1] != '\n')
|
||||||
@ -5177,6 +5302,9 @@ check_precompiled (pcf, st, fname, limit)
|
|||||||
length = safe_read (pcf, buf, s);
|
length = safe_read (pcf, buf, s);
|
||||||
if (length < 0)
|
if (length < 0)
|
||||||
goto nope;
|
goto nope;
|
||||||
|
#ifdef NU64
|
||||||
|
nu64cutcr(&buf, &length);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
abort ();
|
abort ();
|
||||||
@ -7645,6 +7773,9 @@ skip_to_end_of_comment (ip, line_counter, nowarn)
|
|||||||
if (*bp == '\n') {
|
if (*bp == '\n') {
|
||||||
if (bp[-1] != '\\')
|
if (bp[-1] != '\\')
|
||||||
break;
|
break;
|
||||||
|
#ifdef NU64
|
||||||
|
if ( iskanji1( bp[-2] ) ) break;
|
||||||
|
#endif
|
||||||
if (!nowarn && warn_comments)
|
if (!nowarn && warn_comments)
|
||||||
warning ("multiline `//' comment");
|
warning ("multiline `//' comment");
|
||||||
if (line_counter)
|
if (line_counter)
|
||||||
|
2
cexp.y
2
cexp.y
@ -128,7 +128,7 @@ struct arglist {
|
|||||||
# define PRINTF_DCL(msg)
|
# define PRINTF_DCL(msg)
|
||||||
# define PRINTF_PROTO(ARGS, m, n) PROTO (ARGS) __attribute__ ((format (__printf__, m, n)))
|
# define PRINTF_PROTO(ARGS, m, n) PROTO (ARGS) __attribute__ ((format (__printf__, m, n)))
|
||||||
#else
|
#else
|
||||||
# include <varargs.h>
|
# include <stdarg.h>
|
||||||
# define VA_START(va_list, var) va_start (va_list)
|
# define VA_START(va_list, var) va_start (va_list)
|
||||||
# define PRINTF_ALIST(msg) msg, va_alist
|
# define PRINTF_ALIST(msg) msg, va_alist
|
||||||
# define PRINTF_DCL(msg) char *msg; va_dcl
|
# define PRINTF_DCL(msg) char *msg; va_dcl
|
||||||
|
@ -78,7 +78,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Must precede rtl.h for FFS. */
|
/* Must precede rtl.h for FFS. */
|
||||||
|
10
config.sub
vendored
10
config.sub
vendored
@ -616,6 +616,10 @@ case $basic_machine in
|
|||||||
xps | xps100)
|
xps | xps100)
|
||||||
basic_machine=xps100-honeywell
|
basic_machine=xps100-honeywell
|
||||||
;;
|
;;
|
||||||
|
nu64)
|
||||||
|
basic_machine=mips-nintendo
|
||||||
|
os=-nu64
|
||||||
|
;;
|
||||||
none)
|
none)
|
||||||
basic_machine=none-none
|
basic_machine=none-none
|
||||||
os=-none
|
os=-none
|
||||||
@ -775,6 +779,9 @@ case $os in
|
|||||||
-xenix)
|
-xenix)
|
||||||
os=-xenix
|
os=-xenix
|
||||||
;;
|
;;
|
||||||
|
-nu64)
|
||||||
|
os=-nu64
|
||||||
|
;;
|
||||||
-none)
|
-none)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -893,6 +900,9 @@ case $basic_machine in
|
|||||||
f301-fujitsu)
|
f301-fujitsu)
|
||||||
os=-uxpv
|
os=-uxpv
|
||||||
;;
|
;;
|
||||||
|
*-nu64)
|
||||||
|
os=-nu64
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
os=-none
|
os=-none
|
||||||
;;
|
;;
|
||||||
|
@ -139,7 +139,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#define MD_STARTFILE_PREFIX "/usr/lib/"
|
#define MD_STARTFILE_PREFIX "/usr/lib/"
|
||||||
|
|
||||||
/* Macros to be automatically defined.
|
/* Macros to be automatically defined.
|
||||||
__CLASSIFY_TYPE__ is used in the <varargs.h> and <stdarg.h> header
|
__CLASSIFY_TYPE__ is used in the <stdarg.h> and <stdarg.h> header
|
||||||
files with DG/UX revision 5.40 and later. This allows GNU CC to
|
files with DG/UX revision 5.40 and later. This allows GNU CC to
|
||||||
operate without installing the header files. */
|
operate without installing the header files. */
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#define CPU_DEFAULT MASK_88000
|
#define CPU_DEFAULT MASK_88000
|
||||||
|
|
||||||
/* Macros to be automatically defined. __svr4__ is our extension.
|
/* Macros to be automatically defined. __svr4__ is our extension.
|
||||||
__CLASSIFY_TYPE__ is used in the <varargs.h> and <stdarg.h> header
|
__CLASSIFY_TYPE__ is used in the <stdarg.h> and <stdarg.h> header
|
||||||
files with DG/UX revision 5.40 and later. This allows GNU CC to
|
files with DG/UX revision 5.40 and later. This allows GNU CC to
|
||||||
operate without installing the header files. */
|
operate without installing the header files. */
|
||||||
|
|
||||||
|
4638
config/mips/mips.c
4638
config/mips/mips.c
File diff suppressed because it is too large
Load Diff
@ -3514,6 +3514,12 @@ while (0)
|
|||||||
|
|
||||||
See mips.c for the MIPS specific codes. */
|
See mips.c for the MIPS specific codes. */
|
||||||
|
|
||||||
|
/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
|
||||||
|
is a valid machine specific attribute for DECL.
|
||||||
|
The attributes in ATTRIBUTES have previously been assigned to DECL. */
|
||||||
|
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
|
||||||
|
mips_valid_machine_decl_attribute(DECL, ATTRIBUTES, IDENTIFIER, ARGS)
|
||||||
|
|
||||||
#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
|
#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
|
||||||
|
|
||||||
/* A C expression which evaluates to true if CODE is a valid
|
/* A C expression which evaluates to true if CODE is a valid
|
||||||
|
132
config/mips/nu64.h
Normal file
132
config/mips/nu64.h
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
/* Definitions of target machine for GNU compiler. MIPS GNU Hurd version.
|
||||||
|
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU CC.
|
||||||
|
|
||||||
|
GNU CC is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU CC is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU CC; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#include <mips/gnu.h>
|
||||||
|
#include <dbx.h>
|
||||||
|
|
||||||
|
#define MIPS_ISA_DEFAULT 3
|
||||||
|
#define MIPS_CPU_STRING_DEFAULT "4300"
|
||||||
|
#undef TARGET_DEFAULT
|
||||||
|
#define TARGET_DEFAULT ( MASK_GAS | MASK_4300_MUL_FIX )
|
||||||
|
|
||||||
|
#undef CPP_PREDEFINES
|
||||||
|
#define CPP_PREDEFINES GNU_CPP_PREDEFINES("mips") \
|
||||||
|
" -DMIPSEB -DR4000 -DR4300 -D_MIPSEB -D_R4000 -D_R4300 \
|
||||||
|
-D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32"
|
||||||
|
|
||||||
|
#undef LOCAL_LABEL_PREFIX
|
||||||
|
#define LOCAL_LABEL_PREFIX "."
|
||||||
|
|
||||||
|
/* Enable debugging. */
|
||||||
|
|
||||||
|
#undef ASM_FILE_END
|
||||||
|
#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
|
||||||
|
|
||||||
|
#undef PREFERRED_DEBUGGING_TYPE
|
||||||
|
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||||
|
|
||||||
|
#undef DWARF_DEBUGGING_INFO
|
||||||
|
#define DBX_DEBUGGING_INFO
|
||||||
|
#if 0
|
||||||
|
#define SDB_DEBUGGING_INFO
|
||||||
|
#define MIPS_DEBUGGING_INFO
|
||||||
|
/* GNU as does handle DWARF2 directives. */
|
||||||
|
#undef DWARF2_UNWIND_INFO
|
||||||
|
#define DWARF2_UNWIND_INFO 1
|
||||||
|
|
||||||
|
#undef ASM_OUTPUT_SOURCE_LINE
|
||||||
|
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) \
|
||||||
|
mips_output_lineno (STREAM, LINE)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef EXTRA_SECTIONS
|
||||||
|
#define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_sdata
|
||||||
|
|
||||||
|
#undef EXTRA_SECTION_FUNCTIONS
|
||||||
|
#define EXTRA_SECTION_FUNCTIONS \
|
||||||
|
CONST_SECTION_FUNCTION \
|
||||||
|
CTORS_SECTION_FUNCTION \
|
||||||
|
DTORS_SECTION_FUNCTION \
|
||||||
|
SDATA_SECTION_FUNCTION
|
||||||
|
|
||||||
|
#define SDATA_SECTION_FUNCTION \
|
||||||
|
void \
|
||||||
|
sdata_section () \
|
||||||
|
{ \
|
||||||
|
if (in_section != in_sdata) \
|
||||||
|
{ \
|
||||||
|
fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \
|
||||||
|
in_section = in_sdata; \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ASM_SPEC is the set of arguments to pass to the assembler. */
|
||||||
|
#undef ASM_SPEC
|
||||||
|
#define ASM_SPEC "\
|
||||||
|
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
|
||||||
|
%(subtarget_asm_optimizing_spec) \
|
||||||
|
%(subtarget_asm_debugging_spec) \
|
||||||
|
%{membedded-pic} \
|
||||||
|
%{mabi=32:-32}%{mabi=o32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} \
|
||||||
|
%(target_asm_spec) \
|
||||||
|
%(subtarget_asm_spec)"
|
||||||
|
|
||||||
|
#undef LINK_SPEC
|
||||||
|
#define LINK_SPEC ""
|
||||||
|
|
||||||
|
#undef CC1_SPEC
|
||||||
|
#define CC1_SPEC "\
|
||||||
|
%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
|
||||||
|
%{mips1:-mfp32 -mgp32} %{mips2:-mfp32 -mgp32} %{mips3:-mfp32 -mgp32} \
|
||||||
|
%{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} \
|
||||||
|
%{m3900:-mips1 -mcpu=r3900 -mfp32 -mgp32} \
|
||||||
|
%{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: } \
|
||||||
|
%(subtarget_cc1_spec) "
|
||||||
|
|
||||||
|
#undef CPP_SPEC
|
||||||
|
#define CPP_SPEC "\
|
||||||
|
%{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
|
||||||
|
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
|
||||||
|
%{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
|
||||||
|
%{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C -D__LANGUAGE_C -D_LANGUAGE_C} \
|
||||||
|
%{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
|
||||||
|
%{.s: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
|
||||||
|
%{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}} \
|
||||||
|
%(subtarget_cpp_size_spec) \
|
||||||
|
%{mips3:-U__mips -D__mips=3} \
|
||||||
|
%{mips4:-U__mips -D__mips=4 -D__mips64} \
|
||||||
|
%{mgp32:-U__mips64} %{mgp64:-D__mips64} \
|
||||||
|
%{msingle-float:%{!msoft-float:-D__mips_single_float}} \
|
||||||
|
%{m4650:%{!msoft-float:-D__mips_single_float}} \
|
||||||
|
%{msoft-float:-D__mips_soft_float} \
|
||||||
|
%{mabi=eabi:-D__mips_eabi} \
|
||||||
|
%{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \
|
||||||
|
%{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}} \
|
||||||
|
%(long_max_spec) \
|
||||||
|
%(subtarget_cpp_spec) "
|
||||||
|
|
13
configure
vendored
13
configure
vendored
@ -67,6 +67,7 @@ mandir='${prefix}/man'
|
|||||||
# Initialize some other variables.
|
# Initialize some other variables.
|
||||||
subdirs=
|
subdirs=
|
||||||
MFLAGS= MAKEFLAGS=
|
MFLAGS= MAKEFLAGS=
|
||||||
|
DEFS=
|
||||||
# Maximum number of lines to put in a shell here document.
|
# Maximum number of lines to put in a shell here document.
|
||||||
ac_max_here_lines=12
|
ac_max_here_lines=12
|
||||||
|
|
||||||
@ -4483,6 +4484,16 @@ for machine in $build $host $target; do
|
|||||||
;;
|
;;
|
||||||
mips-*-gnu*)
|
mips-*-gnu*)
|
||||||
;;
|
;;
|
||||||
|
mips-nintendo-nu64) # Nintendo NU64
|
||||||
|
xm_file=mips/xm-sysv.h
|
||||||
|
tm_file=mips/nu64.h
|
||||||
|
elf=yes
|
||||||
|
gnu_ld=yes
|
||||||
|
gas=yes
|
||||||
|
xmake_file=mips/x-sysv
|
||||||
|
tmake_file=mips/t-mips-gas
|
||||||
|
DEFS=-DNU64
|
||||||
|
;;
|
||||||
mipsel-*-ecoff*)
|
mipsel-*-ecoff*)
|
||||||
tm_file=mips/ecoffl.h
|
tm_file=mips/ecoffl.h
|
||||||
if [ x$stabs = xyes ]; then
|
if [ x$stabs = xyes ]; then
|
||||||
@ -5810,7 +5821,7 @@ fi
|
|||||||
|
|
||||||
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
||||||
|
|
||||||
DEFS=-DHAVE_CONFIG_H
|
DEFS="-DHAVE_CONFIG_H $DEFS"
|
||||||
|
|
||||||
# Without the "./", some shells look in PATH for config.status.
|
# Without the "./", some shells look in PATH for config.status.
|
||||||
: ${CONFIG_STATUS=./config.status}
|
: ${CONFIG_STATUS=./config.status}
|
||||||
|
@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_STDLIB_H
|
#ifdef HAVE_STDLIB_H
|
||||||
|
@ -39,7 +39,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
#include "rtl.h"
|
#include "rtl.h"
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
|
2
final.c
2
final.c
@ -48,7 +48,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -1416,7 +1416,7 @@ if [ -r ${INPUT}/$file ]; then
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _SYS_VARARGS_H */
|
#endif /* _SYS_VARARGS_H */
|
||||||
|
2
gcc.c
2
gcc.c
@ -49,7 +49,7 @@ compilation is specified by a string called a "spec". */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "rtl.h"
|
#include "rtl.h"
|
||||||
|
@ -603,7 +603,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -418,7 +418,8 @@ __extension__ \
|
|||||||
({ struct obstack *__o = (OBSTACK); \
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
|
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
|
||||||
_obstack_newchunk (__o, sizeof (void *)); \
|
_obstack_newchunk (__o, sizeof (void *)); \
|
||||||
*((void **)__o->next_free)++ = ((void *)datum); \
|
*((void **)__o->next_free) = ((void *)datum); \
|
||||||
|
__o->next_free += sizeof (void *); \
|
||||||
(void) 0; })
|
(void) 0; })
|
||||||
|
|
||||||
# define obstack_int_grow(OBSTACK,datum) \
|
# define obstack_int_grow(OBSTACK,datum) \
|
||||||
|
8
prefix.c
8
prefix.c
@ -68,7 +68,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -80,7 +80,7 @@ static char *translate_name PROTO((char *));
|
|||||||
static char *concat PVPROTO((char *, ...));
|
static char *concat PVPROTO((char *, ...));
|
||||||
static char *save_string PROTO((char *, int));
|
static char *save_string PROTO((char *, int));
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if (defined(_WIN32) && !defined(__CYGWIN32__))
|
||||||
static char *lookup_key PROTO((char *));
|
static char *lookup_key PROTO((char *));
|
||||||
static HKEY reg_key = (HKEY) INVALID_HANDLE_VALUE;
|
static HKEY reg_key = (HKEY) INVALID_HANDLE_VALUE;
|
||||||
#endif
|
#endif
|
||||||
@ -95,7 +95,7 @@ get_key_value (key)
|
|||||||
{
|
{
|
||||||
char *prefix = 0;
|
char *prefix = 0;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if (defined(_WIN32) && !defined(__CYGWIN32__))
|
||||||
prefix = lookup_key (key);
|
prefix = lookup_key (key);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ save_string (s, len)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if (defined(_WIN32) && !defined(__CYGWIN32__))
|
||||||
|
|
||||||
/* Look up "key" in the registry, as above. */
|
/* Look up "key" in the registry, as above. */
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#define _POSIX_SOURCE
|
#define _POSIX_SOURCE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
/* On some systems stdio.h includes stdarg.h;
|
/* On some systems stdio.h includes stdarg.h;
|
||||||
we must bring in varargs.h first. */
|
we must bring in varargs.h first. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
2
toplev.c
2
toplev.c
@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user