OSDN Git Service

* config.gcc: Set default for xmake_file at top, not bottom.
[pf3gnuchains/gcc-fork.git] / gcc / config / a29k / unix.h
1 /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU, Unix.
2    Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc.
3    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
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
23 /* We define unix instead of EPI and define unix-style machine names.  */
24
25 /* Set our default target to be the 29050; that is the more interesting chip
26    for Unix systems.  */
27
28 #undef TARGET_DEFAULT
29 #define TARGET_DEFAULT (1+2+16+128)
30
31 #undef CPP_PREDEFINES
32 #define CPP_PREDEFINES "-Dam29k -Da29k -Dam29000 -Asystem=unix -Acpu=a29k -Amachine=a29k"
33
34 #undef CPP_SPEC
35 #define CPP_SPEC "%{!m29000:-Dam29050 -D__am29050__}"
36
37 /* Use a default linker configuration file.  */
38 #undef LINK_SPEC
39 #define LINK_SPEC "-T default.gld%s"
40
41 /* Define the magic numbers that we recognize as COFF.  */
42
43 #define MY_ISCOFF(magic) ((magic) == SIPFBOMAGIC || (magic) == SIPRBOMAGIC)
44
45 /* For some systems, it is best if double-word objects are aligned on a 
46    doubleword boundary.  We want to maintain compatibility with MetaWare in
47    a29k.h, but do not feel constrained to do so here.  */
48
49 #undef BIGGEST_ALIGNMENT
50 #define BIGGEST_ALIGNMENT 64
51
52 /* Add shared data as a kludge for now.  */
53
54 #undef ASM_FILE_START
55 #define ASM_FILE_START(FILE)                                    \
56 { char *p, *after_dir = main_input_filename;                    \
57   if (TARGET_29050)                                             \
58     fprintf (FILE, "\t.cputype 29050\n");                       \
59   for (p = main_input_filename; *p; p++)                        \
60     if (*p == '/')                                              \
61       after_dir = p + 1;                                        \
62   fprintf (FILE, "\t.file ");                                   \
63   output_quoted_string (FILE, after_dir);                       \
64   fprintf (FILE, "\n");                                         \
65   if (flag_shared_data)                                         \
66     fprintf (FILE, "\t.sect .shdata,data\n");                   \
67   fprintf (FILE, "\t.sect .lit,lit\n");  }
68
69 /* Output before shared  data.  */
70
71 #define SHARED_SECTION_ASM_OP "\t.use .shdata"
72
73 /* If we want shared data, we have to turn off commons.  */
74
75 #define OVERRIDE_OPTIONS if (flag_shared_data) flag_no_common = 1;
76
77 /* Default to -fno-pcc-struct-return, since we don't have to worry about
78    compatibility.  */
79 #define DEFAULT_PCC_STRUCT_RETURN 0
80
81 #if 0 /* This would be needed except that the 29k doesn't have strict
82          alignment requirements.  */
83
84 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)                               \
85   (((TYPE) != 0)                                                        \
86         ? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY)                          \
87                 ? PARM_BOUNDARY                                         \
88                 : TYPE_ALIGN(TYPE))                                     \
89         : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY)                  \
90                 ? PARM_BOUNDARY                                         \
91                 : GET_MODE_ALIGNMENT(MODE)))
92 #endif