1 /* Definitions of taret machine for GNU compiler.
3 Copyright 2001, 2002 Free Software Foundation, Inc.
4 Contributed by Alexandre Oliva <aoliva@redhat.com>
6 This file is part of GNU CC.
8 GNU CC is free software; you can redistribute it and/or modify
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)
13 GNU CC is distributed in the hope that it will be useful,
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.
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 #undef PREFERRED_DEBUGGING_TYPE
24 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
26 #define TARGET_OS_CPP_BUILTINS() \
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"); \
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}"
43 #define ASM_SPEC "%{Wa,*:%*}"
46 #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
48 %{rdynamic:-export-dynamic} \
49 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
55 %{!static:-rpath-link %R/lib:%R/usr/lib} \
56 %{!shared: %{pthread:-lpthread} \
57 %{profile:-lc_p} %{!profile: -lc}}"
60 #define STARTFILE_SPEC \
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}"
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 }}
75 #define TARGET_DEFAULT 6
78 #define TARGET_VERSION fprintf (stderr, " (AM33/2.0 GNU/Linux)");
80 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
82 extern int mn10300_protect_label;
85 #define PRINT_OPERAND(FILE, X, CODE) \
88 mn10300_protect_label = 1; \
89 print_operand ((FILE), (X), (CODE)); \
90 mn10300_protect_label = 0; \
94 #undef PRINT_OPERAND_ADDRESS
95 #define PRINT_OPERAND_ADDRESS(FILE, X) \
98 mn10300_protect_label = 1; \
99 print_operand_address ((FILE), (X)); \
100 mn10300_protect_label = 0; \
104 #undef ASM_OUTPUT_LABELREF
105 #define ASM_OUTPUT_LABELREF(FILE, NAME) \
108 const char * real_name; \
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); \