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