?? tm-mips.h
字號:
/* Definitions of target machine for GNU compiler. MIPS version. Contributed by A. Lichnewsky, lich@inria.inria.fr Changes by Michael Meissner, meissner@osf.org Copyright (C) 1989, 1990 Free Software Foundation, Inc.This file is part of GNU CC.GNU CC is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 1, or (at your option)any later version.GNU CC is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU CC; see the file COPYING. If not, write tothe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. *//* ??? This file needs to be reformatted so that it looks like the rest of GCC. ??? *//*----------------------------------------------------------------------SWITCHES: -O optimization. Implies -mgpOPT -O1 Same as -O, mips compatibility -O2 Implies -O -fomit-frame-pointer -fstrength-reduce -O3 Implies -O2 + -finline-functions -mG0 -mG1 -mG2 Construct a size to be passed to GCC for Data / Sdata selection. Value is ( (i=G0 + 2 G1 + 4 G2) , (i < 6) ? ( 1<<i) :(1 <<(i+3))) Same value should be passed to as + ld using -G. Use -G instead since it is now supported. Default = -mG1 -mG0 (Value = 8). -G32 Implies -G 32 -mG2 -mnG1 -mG0. -bestGnum Pass -bestGnum flag to ld. This helps setting best value for the -G parameter. -ZSYSV for RISC-OS: use the System V environment -ZBSD43 for RISC-OS: use the BSD 4.3 environment----------------------------------------------------------------------*//* Suppression of libg.a when debugging */#define NO_LIBG/* Switch Recognition by gcc.c */#ifdef SWITCH_TAKES_ARG#undef SWITCH_TAKES_ARG#endif#define SWITCH_TAKES_ARG(CHAR) \ ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ || (CHAR) == 'I' || (CHAR) == 'Y' || (CHAR) == 'm' \ || (CHAR) == 'L' || (CHAR) == 'i' || (CHAR) == 'A' \ || (CHAR) == 'G')/* Process -mGxx switches */extern void overide_options ();#define OVERRIDE_OPTIONS overide_options ()/* Names to predefine in the preprocessor for this target machine. */#ifndef CPP_PREDEFINES#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DLANGUAGE_C"#endif/* Extra switches sometimes passed to the assembler. */#ifndef ASM_SPEC#ifndef OSF_OS /* normal MIPS system */#ifndef DECSTATION /* big endian MIPS (MIPS, SGI) */#ifndef SGI_TARGET /* not Silicon Graphics (ie, MIPSco) */#define ASM_SPEC "%{!mrnames:-nocpp} \ %{!mgas: \ %{pipe: %e-pipe is not supported.} \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g1} %{g2} %{g3} %{g0}} \ %{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{mgas:-G 0} \ %{!pic:%{!mpic:%{!mgas:-G 8}}}} \ %{G32: -G 32}} \ %{v} %{K}"#else /* Silicon Graphics */#define ASM_SPEC "%{!mrnames:-nocpp} \ %{!mgas: \ %{pipe: %e-pipe is not supported.} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g1} %{g2} %{g3} %{g0}} \ %{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{mgas:-G 0} \ %{!pic:%{!mpic:%{!mgas:-G 8}}}} \ %{G32: -G 32}} \ %{v} %{K}"#endif /* Silicon Graphics */#else /* Ultrix Decstation (little endian) */#define ASM_SPEC "%{!mrnames:-nocpp} \ %{!mgas: \ %{pipe:%e:-pipe not supported} \ %{EL} %{!EL:-EL} \ %{EB: %e-EB not supported} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g1} %{g2} %{g3} %{g0}} \ %{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{mgas:-G 0} \ %{!pic:%{!mpic:%{!mgas:-G 8}}}} \ %{G32: -G 32}} \ %{v} %{K}"#endif /* DECstation running Ultrix */#else /* OSF/1 of some sort */#ifndef DECSTATION /* Big endian MIPS running OSF/1 */#define ASM_SPEC "%{mmips-as: \ %{pipe:%e:-pipe not supported} \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ %{!mrnames:-nocpp} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g1} %{g2} %{g3} %{g0} \ %{v} %{K}} \ %{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{!mmips-as:-G 0} \ %{!pic:%{!mpic:%{mmips-as:-G 8}}}} \ %{G32: -G 32}}"#else /* Little endian OSF/1 Decstation */#define ASM_SPEC "%{mmips-as: \ %{pipe:%e:-pipe not supported} \ %{EL} %{!EL:-EL} \ %{EB: %e-EB not supported} \ %{!mrnames:-nocpp} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g1} %{g2} %{g3} %{g0} \ %{v} %{K}} \ %{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{!mmips-as:-G 0} \ %{!pic:%{!mpic:%{mmips-as:-G 8}}}} \ %{G32: -G 32}}"#endif /* little endian OSF/1 DECstation */#endif /* OSF/1 */#endif /* ASM_SPEC *//* Redefinition of libraries used. Mips doesn't support normal UNIX style profiling via calling _mcount. It does offer profiling that samples the PC, so do what we can... */#ifndef LIB_SPEC#define LIB_SPEC "%{pg:%e-pg is not supported on the MIPS}%{p:-lprof1} -lc"#endif/* Inhibit use of -lg. */#define LIBG_SPEC ""/* Extra switches sometimes passed to the loader. */#ifndef LINK_SPEC#ifdef MIPS_SYSV /* RISC-OS SYSTEM V */#ifndef STARTFILE_SPEC#define STARTFILE_SPEC \ "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s crtn.o%s}}"#endif#define LINK_SPEC "%{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{mgas:-G 0} \ %{!pic:%{!mpic:%{!mgas:-G 8}}}} \ %{G32:-G 32}} \ %{!G:%{!G32: \ %{mG0:%eYou should include ld/as option -G} \ %{mG1:%eYou should include ld/as option -G} \ %{mG2:%eYou should include ld/as option -G}}} \ %{bestGnum} \ %{!ZBSD43:-systype /sysv/}%{ZBSD43:-systype /bsd43/} \ %{EB} %{!EB:-EB} %{EL:%e-EL not supported}"#else /* RISC-OS SYSTEM V */#ifdef MIPS_BSD43 /* RISC-OS BSD */#ifndef STARTFILE_SPEC#define STARTFILE_SPEC \ "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s crtn.o%s}}"#endif#define LINK_SPEC "%{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{mgas:-G 0} \ %{!pic:%{!mpic:%{!mgas:-G 8}}}} \ %{G32:-G 32}} \ %{!G:%{!G32: \ %{mG0:%eYou should include ld/as option -G} \ %{mG1:%eYou should include ld/as option -G} \ %{mG2:%eYou should include ld/as option -G}}} \ %{bestGnum} \ %{!ZSYSV:-systype /bsd43/}%{ZSYSV:-systype /sysv/} \ %{EB} %{!EB:-EB} %{EL:%e-EL not supported}"#else#ifndef DECSTATION /* Big endian BSD or OSF/1 system */#ifndef OSF_OS /* Big endian BSD system */#ifndef SGI_TARGET /* Big endian non Silicon Graphics system */#define LINK_SPEC "%{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{mgas:-G 0} \ %{!pic:%{!mpic:%{!mgas:-G 8}}}} \ %{G32:-G 32}} \ %{!G:%{!G32: \ %{mG0:%eYou should include ld/as option -G} \ %{mG1:%eYou should include ld/as option -G} \ %{mG2:%eYou should include ld/as option -G}}} \ %{!mgas: %{EB} %{!EB:-EB} %{EL:%e-EL not supported} \ %{bestGnum}}"#else /* Silicon graphics system */#define LINK_SPEC "%{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{mgas:-G 0} \ %{!pic:%{!mpic:%{!mgas:-G 8}}}} \ %{G32:-G 32}} \ %{!G:%{!G32: \ %{mG0:%eYou should include ld/as option -G} \ %{mG1:%eYou should include ld/as option -G} \ %{mG2:%eYou should include ld/as option -G}}} \ %{!mgas: %{bestGnum}}"#endif /* Silicon Graphics system */#else /* Big endian OSF/1 system */#define LINK_SPEC "%{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{!mmips-as:-G 0} \ %{!pic:%{!mpic:%{mmips-as:-G 8}}}} \ %{G32:-G 32}} \ %{!G:%{!G32: \ %{mG0:%eYou should include ld/as option -G} \ %{mG1:%eYou should include ld/as option -G} \ %{mG2:%eYou should include ld/as option -G}}} \ %{mmips-as: %{EB} %{!EB:-EB} %{EL:%e-EL not supported} \ %{bestGnum}} \ %{nostdlib}"#endif /* Big endian BSD or OSF/1 system */#else /* Little endian Ultrix or OSF/1 */#ifndef OSF_OS /* Little endian Ultrix system */#define LINK_SPEC "%{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{mgas:-G 0} \ %{!pic:%{!mpic:%{!mgas:-G 8}}}} \ %{G32:-G 32}} \ %{!G:%{!G32: \ %{mG0:%eYou should include ld/as option -G} \ %{mG1:%eYou should include ld/as option -G} \ %{mG2:%eYou should include ld/as option -G}}} \ %{!mgas: %{EL} %{!EL:-EL} %{EB:%e-EB not supported} \ %{bestGnum}}"#else /* Little endian OSF/1 system */#define LINK_SPEC "%{G*} \ %{!G:%{!G32: %{mpic:-G 0} %{pic:-G 0} \ %{!mmips-as:-G 0} \ %{!pic:%{!mpic:%{mmips-as:-G 8}}}} \ %{G32:-G 32}} \ %{!G:%{!G32: \ %{mG0:%eYou should include ld/as option -G} \ %{mG1:%eYou should include ld/as option -G} \ %{mG2:%eYou should include ld/as option -G}}} \ %{mmips-as: %{EL} %{!EL:-EL} %{EB:%e-EB not supported} \ %{bestGnum}} \ %{nostdlib}"#endif /* Little endian OSF/1 system */#endif /* Little endian BSD or OSF/1 system */#endif /* RISC-OS BSD */#endif /* RISC-OS SYSTEM V */#endif /* LINK_SPEC defined *//* CC1 SPECS */#define CC1_SPEC "%{O: %{!mngpOPT:-mgpOPT}} \ %{O1:-O %{!mngpOPT:-mgpOPT}} \ %{O2:-O %{!fnostrength-reduce:-fstrength-reduce} \ %{!fnoomit-frame-pointer:-fomit-frame-pointer} \ %{!mngpOPT:-mgpOPT}} \ %{O3:-O %{!fnostrength-reduce:-fstrength-reduce} \ %{!fnoomit-frame-pointer:-fomit-frame-pointer} \ %{!fnoinline-functions:-finline-functions} \ %{!mngpOPT:-mgpOPT}} \ %{O4:%eGCC does not support -O4} \ %{!g: %{g1:-g} %{g2:-g} %{g3:-g}} \ %{G32: -mG2 -mnG1 }"/* CPP SPECS */#ifndef DECSTATION#ifdef SGI_TARGET /* Silicon Graphics */#define CPP_SPEC " %{!ansi:-D__EXTENSIONS__} \ -D_MIPSEB -D_SYSTYPE_SYSV -D_LANGUAGE_C \ %{O1:-D__OPTIMIZE__} \ %{O2:-D__OPTIMIZE__} \ %{O3:-D__OPTIMIZE__}"#else#if defined(MIPS_SYSV) || defined(MIPS_BSD43) /* MIPS RISC-OS environments */#ifdef MIPS_SYSV#define CPP_SPEC " %{!ansi:%{!ZBSD43:-DSYSTYPE_SYSV}%{ZBSD43:-DSYSTYPE_BSD43}}\ %{!ZBSD43:-D__SYSTYPE_SYSV__}%{ZBSD43:-D__SYSTYPE_BSD43__} \ %{O1:-D__OPTIMIZE__} \ %{O2:-D__OPTIMIZE__} \ %{O3:-D__OPTIMIZE__}"#else /* not MIPS_SYSV *//* Use this instead of a conditional -I in CPP_SPEC because -I adds the dir in the wrongplace in the search path. */#define CC_INCLUDE_DIR "/bsd43/usr/include"#define CPP_SPEC " %{!ansi:%{!ZSYSV:-DSYSTYPE_BSD43}%{ZSYSV:-DSYSTYPE_SYSV}}\ %{!ZSYSV:-D__SYSTYPE_BSD43__}%{ZSYSV:-D__SYSTYPE_SYSV__}\ %{O1:-D__OPTIMIZE__} \ %{O2:-D__OPTIMIZE__} \ %{O3:-D__OPTIMIZE__}"#endif /* not MIPS_SYSV */#else /* not MIPS_SYSV and not MIPS_BSD43 */ /* default MIPS Bsd environment */#define CPP_SPEC "%{!ansi:-DSYSTYPE_BSD} -D__SYSTYPE_BSD__ \ %{O1:-D__OPTIMIZE__} \ %{O2:-D__OPTIMIZE__} \ %{O3:-D__OPTIMIZE__}"#endif /* not MIPS_SYSV and not MIPS_BSD43 */#endif /* not Silicon Graphics */#else /* DECSTATION */#define CPP_SPEC "%{O1:-D__OPTIMIZE__} \ %{O2:-D__OPTIMIZE__} \ %{O3:-D__OPTIMIZE__}"#endif /* not DECSTATION *//* Print subsidiary information on the compiler version in use. */#ifndef __DATE__#define __DATE__ "[unknown date]"#endif#define MIPS_VERSION "AL-MIPS 1.1"#ifdef DECSTATION#ifdef OSF_OS#define MACHINE_TYPE "OSF/1 Dec Mips"#else#define MACHINE_TYPE "Ultrix Dec Mips"#endif#else#ifdef SGI_TARGET
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -