OSDN Git Service

f1a0d21bfb1bbac63d39153aabd3e533beeb99eb
[pf3gnuchains/gcc-fork.git] / gcc / config / mips / r3900.h
1 /* Definitions of MIPS sub target machine for GNU compiler. 
2    Toshiba r3900.  You should include mips.h after this.
3
4    Copyright (C) 1989, 90-6, 1997 Free Software Foundation, Inc.
5    Contributed by Gavin Koch (gavin@cygnus.com).
6
7 This file is part of GNU CC.
8
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING.  If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA.  */
23
24 #define SUBTARGET_CPP_SPEC "\
25 %{!mabi=32: %{!mabi=n32: %{!mabi=64: -D__mips_eabi}}} \
26 %{!msingle-float:-D__mips_soft_float} \
27 %{mhard-float:%e-mhard-float not supported.} \
28 %{msingle-float:%{msoft-float: \
29   %e-msingle-float and -msoft-float can not both be specified.}}"
30
31 /* The following is needed because -mips3 and -mips4 set gp64 which in
32    combination with abi=eabi, causes long64 to be set. */
33 #define SUBTARGET_CPP_SIZE_SPEC "\
34 %{mips3:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
35 %{mips4:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
36 %{!mips3:%{!mips4:%{!m4650:\
37   -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}} "
38
39 /* by default (if not mips-something-else) produce code for the r3900 */
40 #define SUBTARGET_CC1_SPEC "\
41 %{mhard-float:%e-mhard-float not supported.} \
42 %{msingle-float:%{msoft-float: \
43   %e-msingle-float and -msoft-float can not both be specified.}}"
44
45 #define TARGET_DEFAULT (MASK_SOFT_FLOAT | MASK_MIPS3900)
46 #define MIPS_CPU_STRING_DEFAULT "R3900"
47 #define MIPS_ISA_DEFAULT 1
48
49 #define MULTILIB_DEFAULTS { "EB", "msoft-float" }
50
51 /* We use the MIPS EABI by default.  */
52 #define MIPS_ABI_DEFAULT ABI_EABI
53
54
55 /* Debugging */
56
57 #define DWARF2_DEBUGGING_INFO
58 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
59
60 /* For the 'preferred' cases ("gN" and "ggdbN") we need to tell the 
61    gnu assembler "dwarf-2" */
62    
63 #define SUBTARGET_ASM_DEBUGGING_SPEC "\
64 %{!mmips-as: \
65   %{g:-gdwarf-2} %{g0:-gdwarf-2} %{g1:-gdwarf-2} %{g2:-gdwarf-2} %{g3:-gdwarf-2} \
66   %{ggdb:-gdwarf-2} %{ggdb0:-gdwarf-2} %{ggdb1:-gdwarf-2} %{ggdb2:-gdwarf-2} %{ggdb3:-gdwarf-2} \
67   %{gdwarf-2*:-gdwarf-2}} \
68 %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
69 %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
70 %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}"
71
72 /* This is how to equate one symbol to another symbol.  The syntax used is
73    `SYM1=SYM2'.  Note that this is different from the way equates are done
74    with most svr4 assemblers, where the syntax is `.set SYM1,SYM2'.  */
75
76 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                            \
77  do { fprintf ((FILE), "\t");                                         \
78       assemble_name (FILE, LABEL1);                                   \
79       fprintf (FILE, " = ");                                          \
80       assemble_name (FILE, LABEL2);                                   \
81       fprintf (FILE, "\n");                                           \
82  } while (0)
83
84 #define SUPPORTS_WEAK 1
85 #define ASM_WEAKEN_LABEL(FILE,NAME)                                   \
86  do { fprintf ((FILE), "\t.weak\t");                                  \
87       assemble_name (FILE, NAME);                                     \
88       fprintf (FILE, "\n");                                           \
89  } while (0)