aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/a29k/unix.h
blob: 4b03e425eb1694f782a90bd3eb97bf26dd0926bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/* Definitions of target machine for GNU compiler, for AMD Am29000 CPU, Unix.
   Copyright (C) 1991, 1993 Free Software Foundation, Inc.
   Contributed by Richard Kenner (kenner@nyu.edu)

This file is part of GNU CC.

GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */


/* This is mostly the same as a29k.h, except that we define unix instead of
   EPI and define unix-style machine names.  */

#include "a29k/a29k.h"

/* Set our default target to be the 29050; that is the more interesting chip
   for Unix systems.  */

#undef TARGET_DEFAULT
#define TARGET_DEFAULT (1+2+16+128)

#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dam29k -Da29k -Dam29000 -Asystem(unix) -Acpu(a29k) -Amachine(a29k)"

#undef CPP_SPEC
#define CPP_SPEC "%{!m29000:-Dam29050 -D__am29050__}"

/* Use a default linker configuration file.  */
#undef LINK_SPEC
#define LINK_SPEC "-T default.gld%s"

/* Define the magic numbers that we recognize as COFF.  */

#define MY_ISCOFF(magic) ((magic) == SIPFBOMAGIC || (magic) == SIPRBOMAGIC)

/* For some systems, it is best if double-word objects are aligned on a 
   doubleword boundary.  We want to maintain compatibility with MetaWare in
   a29k.h, but do not feel constrained to do so here.  */

#undef BIGGEST_ALIGNMENT
#define BIGGEST_ALIGNMENT 64

/* Add shared data as a kludge for now.  */

#undef ASM_FILE_START
#define ASM_FILE_START(FILE)					\
{ char *p, *after_dir = main_input_filename;			\
  if (TARGET_29050)						\
    fprintf (FILE, "\t.cputype 29050\n");			\
  for (p = main_input_filename; *p; p++)			\
    if (*p == '/')						\
      after_dir = p + 1;					\
  fprintf (FILE, "\t.file ");					\
  output_quoted_string (FILE, after_dir);			\
  fprintf (FILE, "\n");						\
  if (flag_shared_data)						\
    fprintf (FILE, "\t.sect .shdata,data\n");			\
  fprintf (FILE, "\t.sect .lit,lit\n");  }

/* Output before shared  data.  */

#define SHARED_SECTION_ASM_OP "\t.use .shdata"

/* If we want shared data, we have to turn off commons.  */

#define OVERRIDE_OPTIONS if (flag_shared_data) flag_no_common = 1;

#if 0 /* This would be needed except that the 29k doesn't have strict
	 alignment requirements.  */

#define FUNCTION_ARG_BOUNDARY(MODE, TYPE)				\
  (((TYPE) != 0)							\
	? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY)				\
		? PARM_BOUNDARY						\
		: TYPE_ALIGN(TYPE))					\
	: ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY)			\
		? PARM_BOUNDARY						\
		: GET_MODE_ALIGNMENT(MODE)))
#endif