OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / config / mips / elf64.h
1 /* Definitions of target machine for GNU compiler.  MIPS R4000 version with
2    GOFAST floating point library.
3    Copyright (C) 1994 Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
20
21 #define OBJECT_FORMAT_ELF
22
23 /* Default to -mips3.  */
24 #define TARGET_DEFAULT MASK_FLOAT64|MASK_64BIT
25 #define MIPS_ISA_DEFAULT 3
26
27 /* Until we figure out what MIPS ELF targets normally use, just do
28    stabs in ELF.  */
29 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
30
31 #include "mips/mips.h"
32
33 #undef CPP_PREDEFINES
34 #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000"
35
36 /* This is the same as the one in mips64.h except that it defines __mips=3
37    at the end.  I would rather put this in CPP_PREDEFINES, but the gcc
38    driver doesn't handle -U options in CPP_PREDEFINES.  */
39 #undef CPP_SPEC
40 #define CPP_SPEC "\
41 %{.cc:  -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
42 %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
43 %{.C:   -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
44 %{.m:   -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \
45 %{.S:   -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
46 %{.s:   -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
47 %{!.S:%{!.s:    -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}} \
48 %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
49 %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
50 %{!mips1:%{!mips2:-U__mips -D__mips=3}}"
51
52 /* Use memcpy, et. al., rather than bcopy.  */
53 #define TARGET_MEM_FUNCTIONS
54
55 /* US Software GOFAST library support.  */
56 #include "gofast.h"
57 #define INIT_TARGET_OPTABS INIT_GOFAST_OPTABS
58
59 /* We need to use .esize and .etype instead of .size and .type to
60    avoid conflicting with ELF directives.  */
61 #undef PUT_SDB_SIZE
62 #define PUT_SDB_SIZE(a)                                 \
63 do {                                                    \
64   extern FILE *asm_out_text_file;                       \
65   fprintf (asm_out_text_file, "\t.esize\t%d;", (a));    \
66 } while (0)
67
68 #undef PUT_SDB_TYPE
69 #define PUT_SDB_TYPE(a)                                 \
70 do {                                                    \
71   extern FILE *asm_out_text_file;                       \
72   fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a));  \
73 } while (0)