Initial revision
[official-gcc.git] / gcc / config / mips / elf64.h
blob3d1a91bba8f5b4cfc88aed2ea1bdad181b9b9566
1 /* Definitions of target machine for GNU compiler. MIPS R4000 version with
2 GOFAST floating point library.
3 Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
5 This file is part of GNU CC.
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.
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.
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. */
22 #define OBJECT_FORMAT_ELF
24 /* Default to -mips3. */
25 #define TARGET_DEFAULT MASK_FLOAT64|MASK_64BIT
26 #define MIPS_ISA_DEFAULT 3
28 #ifndef MULTILIB_DEFAULTS
29 #ifndef TARGET_ENDIAN_DEFAULT
30 #define MULTILIB_DEFAULTS { "EB", "mips3" }
31 #else
32 #define MULTILIB_DEFAULTS { "EL", "mips3" }
33 #endif
34 #endif
36 /* Until we figure out what MIPS ELF targets normally use, just do
37 stabs in ELF. */
38 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
40 #include "mips/mips.h"
42 #undef CPP_PREDEFINES
43 #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000"
45 /* I would rather put this in CPP_PREDEFINES, but the gcc driver
46 doesn't handle -U options in CPP_PREDEFINES. */
47 #undef SUBTARGET_CPP_SPEC
48 #define SUBTARGET_CPP_SPEC "\
49 %{!mips1:%{!mips2:-U__mips -D__mips=3 -D__mips64}}"
51 /* Use memcpy, et. al., rather than bcopy. */
52 #define TARGET_MEM_FUNCTIONS
54 /* US Software GOFAST library support. */
55 #include "gofast.h"
56 #define INIT_TARGET_OPTABS INIT_GOFAST_OPTABS
58 /* Biggest alignment supported by the object file format of this
59 machine. Use this macro to limit the alignment which can be
60 specified using the `__attribute__ ((aligned (N)))' construct. If
61 not defined, the default value is `BIGGEST_ALIGNMENT'. */
63 #define MAX_OFILE_ALIGNMENT (32768*8)
65 /* We need to use .esize and .etype instead of .size and .type to
66 avoid conflicting with ELF directives. */
67 #undef PUT_SDB_SIZE
68 #define PUT_SDB_SIZE(a) \
69 do { \
70 extern FILE *asm_out_text_file; \
71 fprintf (asm_out_text_file, "\t.esize\t%d;", (a)); \
72 } while (0)
74 #undef PUT_SDB_TYPE
75 #define PUT_SDB_TYPE(a) \
76 do { \
77 extern FILE *asm_out_text_file; \
78 fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a)); \
79 } while (0)
81 /* A C statement to output something to the assembler file to switch to section
82 NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
83 NULL_TREE. Some target formats do not support arbitrary sections. Do not
84 define this macro in such cases. */
86 #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \
87 do { \
88 extern FILE *asm_out_text_file; \
89 if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
90 fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \
91 else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
92 fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \
93 else \
94 fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \
95 } while (0)