diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-07-10 04:50:15 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2003-07-10 04:50:15 +0000 |
commit | 2beef00e789b6e930fb0b224f333464fe6f3c84e (patch) | |
tree | 6d7560fd50ccbae889ab219b53a58be5d48afd44 /gcc/config/mn10300 | |
parent | 75040a044e3563d6168aea06f076dd1334ef0a7a (diff) | |
download | gcc-2beef00e789b6e930fb0b224f333464fe6f3c84e.zip gcc-2beef00e789b6e930fb0b224f333464fe6f3c84e.tar.gz gcc-2beef00e789b6e930fb0b224f333464fe6f3c84e.tar.bz2 |
[multiple changes]
2001-12-13 Alexandre Oliva <aoliva@redhat.com>
* config/mn10300/linux.h (LINK_SPEC): Rename the dynamic linker
from ld-linux.so.2 to ld.so.1.
2001-11-18 Alexandre Oliva <aoliva@redhat.com>
* config/mn10300/linux.h (LINK_SPEC): -lpthread, not -lthread.
* config/mn10300/linux.h (LINK_SPEC): Don't handle -Wl,-rpath
nor -Wl,-rpath-link.
(LIB_SPEC): Add -rpath-link if !static.
2001-08-22 Alexandre Oliva <aoliva@redhat.com>
* config/mn10300/mn10300.c (mn10300_protect_label): New
variable.
* config/mn10300/linux.h (PRINT_OPERAND,
PRINT_OPERAND_ADDRESS): Set it during their execution.
(ASM_OUTPUT_LABELREF): Output `+' before symbol name if
mn10300_protect_label is set.
* config/mn10300/linux.h (LINK_SPEC): Recognize -Wl,-rpath and
-Wl,-rpath-link.
(LIB_SPEC, STARTFILE_SPEC): Define.
2001-05-11 Alexandre Oliva <aoliva@redhat.com>
* config/mn10300/t-linux (dp-bit.c, fp-bit.c): Don't define
FLOAT_BIT_ORDER_MISMATCH.
2001-05-09 Alexandre Oliva <aoliva@redhat.com>
* config.gcc (am33_2.0-*-linux*): Added.
* config/mn10300/linux.h: New.
* config/mn10300/t-linux: New.
From-SVN: r69171
Diffstat (limited to 'gcc/config/mn10300')
-rw-r--r-- | gcc/config/mn10300/linux.h | 116 | ||||
-rw-r--r-- | gcc/config/mn10300/mn10300.c | 6 | ||||
-rw-r--r-- | gcc/config/mn10300/t-linux | 11 |
3 files changed, 133 insertions, 0 deletions
diff --git a/gcc/config/mn10300/linux.h b/gcc/config/mn10300/linux.h new file mode 100644 index 0000000..1ae5b01 --- /dev/null +++ b/gcc/config/mn10300/linux.h @@ -0,0 +1,116 @@ +/* Definitions of taret machine for GNU compiler. + Matsushita AM33/2.0 + Copyright 2001, 2002 Free Software Foundation, Inc. + Contributed by Alexandre Oliva <aoliva@redhat.com> + + 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#undef PREFERRED_DEBUGGING_TYPE +#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG + +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("unix"); \ + builtin_define_std ("linux"); \ + builtin_define ("__gnu_linux__"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=posix"); \ + } \ + while (0) + +#undef CPP_SPEC +#define CPP_SPEC "%{mam33:-D__AM33__} %{!mam33:-D__AM33__=2 -D__AM33_2__} \ + %{posix:-D_POSIX_SOURCE} \ + %{pthread:-D_REENTRANT -D_PTHREADS}" + +#undef ASM_SPEC +#define ASM_SPEC "%{Wa,*:%*}" + +#undef LINK_SPEC +#define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ + %{static:-static}" + +#undef LIB_SPEC +#define LIB_SPEC \ + "%{shared: -lc} \ + %{!static:-rpath-link %R/lib:%R/usr/lib} \ + %{!shared: %{pthread:-lpthread} \ + %{profile:-lc_p} %{!profile: -lc}}" + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + "%{!shared: \ + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ + %{!p:%{profile:gcrt1.o%s} \ + %{!profile:crt1.o%s}}}} \ + crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" + +#undef TARGET_SWITCHES +#define TARGET_SWITCHES \ + {{ "am33", -0x4, N_("Target the AM33 processor") }, \ + { "am33-2", 6, N_("Target the AM33/2.0 processor") }, \ + { "relax", 0, N_("Enable linker relaxations") }, \ + { "", TARGET_DEFAULT, NULL }} + +#undef TARGET_DEFAULT +#define TARGET_DEFAULT 6 + +#undef TARGET_VERSION +#define TARGET_VERSION fprintf (stderr, " (AM33/2.0 GNU/Linux)"); + +#define DBX_REGISTER_NUMBER(REGNO) (REGNO) + +extern int mn10300_protect_label; + +#undef PRINT_OPERAND +#define PRINT_OPERAND(FILE, X, CODE) \ + do \ + { \ + mn10300_protect_label = 1; \ + print_operand ((FILE), (X), (CODE)); \ + mn10300_protect_label = 0; \ + } \ + while (0) + +#undef PRINT_OPERAND_ADDRESS +#define PRINT_OPERAND_ADDRESS(FILE, X) \ + do \ + { \ + mn10300_protect_label = 1; \ + print_operand_address ((FILE), (X)); \ + mn10300_protect_label = 0; \ + } \ + while (0) + +#undef ASM_OUTPUT_LABELREF +#define ASM_OUTPUT_LABELREF(FILE, NAME) \ + do \ + { \ + const char * real_name; \ + \ + real_name = (*targetm.strip_name_encoding) (NAME); \ + if (mn10300_protect_label) \ + asm_fprintf (FILE, "+"); \ + asm_fprintf (FILE, "%U%s", real_name); \ + } \ + while (0) + diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index e4ef4bf..fc22324 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -48,6 +48,12 @@ Boston, MA 02111-1307, USA. */ UNSPEC_INT_LABELs. */ int mn10300_unspec_int_label_counter; +/* This is used in the am33_2.0-linux-gnu port, in which global symbol + names are not prefixed by underscores, to tell whether to prefix a + label with a plus sign or not, so that the assembler can tell + symbol names from register names. */ +int mn10300_protect_label; + /* The size of the callee register save area. Right now we save everything on entry since it costs us nothing in code size. It does cost us from a speed standpoint, so we want to optimize this sooner or later. */ diff --git a/gcc/config/mn10300/t-linux b/gcc/config/mn10300/t-linux new file mode 100644 index 0000000..a80c1cf --- /dev/null +++ b/gcc/config/mn10300/t-linux @@ -0,0 +1,11 @@ +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +FPBIT = fp-bit.c +DPBIT = dp-bit.c + +dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + +fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c |