]> gcc.gnu.org Git - gcc.git/blob - gcc/config/mips/elf64.h
(CPP_SPEC): If -msingle-float and not -msoft-float, pass -D__mips_single_float.
[gcc.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, 1995 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, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22 #define OBJECT_FORMAT_ELF
23
24 /* Default to -mips3. */
25 #define TARGET_DEFAULT MASK_FLOAT64|MASK_64BIT
26 #define MIPS_ISA_DEFAULT 3
27
28 #ifndef TARGET_ENDIAN_DEFAULT
29 #define MULTILIB_DEFAULTS { "EB", "mips3" }
30 #else
31 #define MULTILIB_DEFAULTS { "EL", "mips3" }
32 #endif
33
34 /* Until we figure out what MIPS ELF targets normally use, just do
35 stabs in ELF. */
36 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
37
38 #include "mips/mips.h"
39
40 #undef CPP_PREDEFINES
41 #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000"
42
43 /* This is the same as the one in mips64.h except that it defines __mips=3
44 at the end. I would rather put this in CPP_PREDEFINES, but the gcc
45 driver doesn't handle -U options in CPP_PREDEFINES. */
46 #undef CPP_SPEC
47 #define CPP_SPEC "\
48 %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
49 %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
50 %{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
51 %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \
52 %{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
53 %{.s: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
54 %{!.S:%{!.s: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}} \
55 %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
56 %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
57 %{!mips1:%{!mips2:-U__mips -D__mips=3 -D__mips64}} \
58 %{mgp32:-U__mips64} %{mgp64:-D__mips64} \
59 %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \
60 %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}} \
61 %{msingle-float:%{!msoft-float:-D__mips_single_float}} \
62 %{m4650:%{!msoft-float:-D__mips_single_float}} \
63 "
64
65 /* Use memcpy, et. al., rather than bcopy. */
66 #define TARGET_MEM_FUNCTIONS
67
68 /* US Software GOFAST library support. */
69 #include "gofast.h"
70 #define INIT_TARGET_OPTABS INIT_GOFAST_OPTABS
71
72 /* We need to use .esize and .etype instead of .size and .type to
73 avoid conflicting with ELF directives. */
74 #undef PUT_SDB_SIZE
75 #define PUT_SDB_SIZE(a) \
76 do { \
77 extern FILE *asm_out_text_file; \
78 fprintf (asm_out_text_file, "\t.esize\t%d;", (a)); \
79 } while (0)
80
81 #undef PUT_SDB_TYPE
82 #define PUT_SDB_TYPE(a) \
83 do { \
84 extern FILE *asm_out_text_file; \
85 fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a)); \
86 } while (0)
87
88 /* A C statement to output something to the assembler file to switch to section
89 NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
90 NULL_TREE. Some target formats do not support arbitrary sections. Do not
91 define this macro in such cases. */
92
93 #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME) \
94 do { \
95 extern FILE *asm_out_text_file; \
96 if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
97 fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \
98 else if ((DECL) && TREE_READONLY (DECL)) \
99 fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \
100 else \
101 fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \
102 } while (0)
This page took 0.044148 seconds and 6 git commands to generate.