]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/mn10300/linux.h
emit-rtl.c (set_used_flags): New.
[thirdparty/gcc.git] / gcc / config / mn10300 / linux.h
CommitLineData
2beef00e
AO
1/* Definitions of taret machine for GNU compiler.
2 Matsushita AM33/2.0
3 Copyright 2001, 2002 Free Software Foundation, Inc.
4 Contributed by Alexandre Oliva <aoliva@redhat.com>
5
7ec022b2 6 This file is part of GCC.
2beef00e 7
7ec022b2 8 GCC is free software; you can redistribute it and/or modify
2beef00e
AO
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
7ec022b2 13 GCC is distributed in the hope that it will be useful,
2beef00e
AO
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
7ec022b2 19 along with GCC; see the file COPYING. If not, write to
2beef00e
AO
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
22
23#undef PREFERRED_DEBUGGING_TYPE
24#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
25
26#define TARGET_OS_CPP_BUILTINS() \
27 do \
28 { \
29 builtin_define_std ("unix"); \
30 builtin_define_std ("linux"); \
31 builtin_define ("__gnu_linux__"); \
32 builtin_assert ("system=unix"); \
33 builtin_assert ("system=posix"); \
34 } \
35 while (0)
36
37#undef CPP_SPEC
38#define CPP_SPEC "%{mam33:-D__AM33__} %{!mam33:-D__AM33__=2 -D__AM33_2__} \
39 %{posix:-D_POSIX_SOURCE} \
40 %{pthread:-D_REENTRANT -D_PTHREADS}"
41
42#undef ASM_SPEC
43#define ASM_SPEC "%{Wa,*:%*}"
44
45#undef LINK_SPEC
46#define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
47 %{!static: \
48 %{rdynamic:-export-dynamic} \
49 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
50 %{static:-static}"
51
52#undef LIB_SPEC
53#define LIB_SPEC \
54 "%{shared: -lc} \
55 %{!static:-rpath-link %R/lib:%R/usr/lib} \
56 %{!shared: %{pthread:-lpthread} \
57 %{profile:-lc_p} %{!profile: -lc}}"
58
59#undef STARTFILE_SPEC
60#define STARTFILE_SPEC \
61 "%{!shared: \
62 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
63 %{!p:%{profile:gcrt1.o%s} \
64 %{!profile:crt1.o%s}}}} \
65 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
66
67#undef TARGET_SWITCHES
68#define TARGET_SWITCHES \
69 {{ "am33", -0x4, N_("Target the AM33 processor") }, \
70 { "am33-2", 6, N_("Target the AM33/2.0 processor") }, \
71 { "relax", 0, N_("Enable linker relaxations") }, \
72 { "", TARGET_DEFAULT, NULL }}
73
74#undef TARGET_DEFAULT
75#define TARGET_DEFAULT 6
76
77#undef TARGET_VERSION
78#define TARGET_VERSION fprintf (stderr, " (AM33/2.0 GNU/Linux)");
79
80#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
81
82extern int mn10300_protect_label;
83
84#undef PRINT_OPERAND
85#define PRINT_OPERAND(FILE, X, CODE) \
86 do \
87 { \
88 mn10300_protect_label = 1; \
89 print_operand ((FILE), (X), (CODE)); \
90 mn10300_protect_label = 0; \
91 } \
92 while (0)
93
94#undef PRINT_OPERAND_ADDRESS
95#define PRINT_OPERAND_ADDRESS(FILE, X) \
96 do \
97 { \
98 mn10300_protect_label = 1; \
99 print_operand_address ((FILE), (X)); \
100 mn10300_protect_label = 0; \
101 } \
102 while (0)
103
104#undef ASM_OUTPUT_LABELREF
105#define ASM_OUTPUT_LABELREF(FILE, NAME) \
106 do \
107 { \
108 const char * real_name; \
109 \
110 real_name = (*targetm.strip_name_encoding) (NAME); \
111 if (mn10300_protect_label) \
112 asm_fprintf (FILE, "+"); \
113 asm_fprintf (FILE, "%U%s", real_name); \
114 } \
115 while (0)
116