Commit 243a7070 by David O'Brien Committed by David O'Brien

config.gcc: Add FreeBSD/IA-64 target.

2001-11-07  David O'Brien  <obrien@FreeBSD.org>
	* config.gcc: Add FreeBSD/IA-64 target. Expand config/i64/elf.h headers.
	* config/i64/ia64.h (TARGET_VERSION,ASM_SPEC,LINK_SPEC): Remove,
	they are OS specific.  Use CPP_CPU_SPEC rather than CPP_PREDEFINES,
	so OS specific files and use CPP_PREDEFINES for their needs.
	* config/i64/elf.h (TARGET_VERSION): Add.  Also, move inclusion of
	target headers to tm_file.
	* config/ia64/aix.h (TARGET_VERSION): Likewise.
	* config/ia64/hpux.h (TARGET_VERSION): Likewise.
	* config/ia64/linux.h (TARGET_VERSION): Likewise.
	(FUNCTION_PROFILER): Remove.
	* config/ia64/ia64.h (FUNCTION_PROFILER): Update defintion using the
	version in config/ia64/linux.h.
	* config/ia64/freebsd.h: New file.
	* config/freebsd.h: Tidy up.
	(_USING_CONFIG_FREEBSD): Define.
	(FBSD_CPP_PREDEFINES): Add __KPRINTF_ATTRIBUTE__.
	(FBSD_CPP_SPEC): Define generic FreeBSD spec.
	(FBSD_STARTFILE_SPEC): Likewise.
	(FBSD_ENDFILE_SPEC): Likewise.
	(FBSD_LIB_SPEC): Likewise.
	(WCHAR_UNSIGNED): Undefine, FreeBSD's wchars are signed.
	(USER_LABEL_PREFIX): Define to ELF compatible value as some CPU headers
	set an ELF-improper one.

Approved by:  Richard Henderson <rth@redhat.com>
              Message-ID: <20011109100352.A6186@redhat.com>

From-SVN: r46909
parent b8e42321
2001-11-07 David O'Brien <obrien@FreeBSD.org>
* config.gcc: Add FreeBSD/IA-64 target. Expand config/i64/elf.h headers.
* config/i64/ia64.h (TARGET_VERSION,ASM_SPEC,LINK_SPEC): Remove,
they are OS specific. Use CPP_CPU_SPEC rather than CPP_PREDEFINES,
so OS specific files and use CPP_PREDEFINES for their needs.
* config/i64/elf.h (TARGET_VERSION): Add. Also, move inclusion of
target headers to tm_file.
* config/ia64/aix.h (TARGET_VERSION): Likewise.
* config/ia64/hpux.h (TARGET_VERSION): Likewise.
* config/ia64/linux.h (TARGET_VERSION): Likewise.
(FUNCTION_PROFILER): Remove.
* config/ia64/ia64.h (FUNCTION_PROFILER): Update defintion using the
version in config/ia64/linux.h.
* config/ia64/freebsd.h: New file.
* config/freebsd.h: Tidy up.
(_USING_CONFIG_FREEBSD): Define.
(FBSD_CPP_PREDEFINES): Add __KPRINTF_ATTRIBUTE__.
(FBSD_CPP_SPEC): Define generic FreeBSD spec.
(FBSD_STARTFILE_SPEC): Likewise.
(FBSD_ENDFILE_SPEC): Likewise.
(FBSD_LIB_SPEC): Likewise.
(WCHAR_UNSIGNED): Undefine, FreeBSD's wchars are signed.
(USER_LABEL_PREFIX): Define to ELF compatible value as some CPU headers
set an ELF-improper one.
2001-11-09 John David Anglin <dave@hiauly1.hia.nrc.ca> 2001-11-09 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (emit_move_sequence): Use cint_ok_for_move to check whether a * pa.c (emit_move_sequence): Use cint_ok_for_move to check whether a
......
...@@ -337,6 +337,7 @@ case $machine in ...@@ -337,6 +337,7 @@ case $machine in
*) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;; *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
esac esac
tmake_file=t-freebsd tmake_file=t-freebsd
xmake_file=none
xm_defines=POSIX xm_defines=POSIX
case x${enable_threads} in case x${enable_threads} in
xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";; xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";;
...@@ -1531,7 +1532,7 @@ ia64*-*-aix*) ...@@ -1531,7 +1532,7 @@ ia64*-*-aix*)
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
;; ;;
ia64*-*-elf*) ia64*-*-elf*)
tm_file=ia64/elf.h tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/elf.h"
tmake_file="ia64/t-ia64" tmake_file="ia64/t-ia64"
target_cpu_default="0" target_cpu_default="0"
if test x$gas = xyes if test x$gas = xyes
...@@ -1544,6 +1545,12 @@ ia64*-*-elf*) ...@@ -1544,6 +1545,12 @@ ia64*-*-elf*)
fi fi
float_format=i386 float_format=i386
;; ;;
ia64*-*-freebsd*)
tm_file="${tm_file} ${fbsd_tm_file} elfos.h ia64/sysv4.h ia64/freebsd.h"
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
tmake_file="${tmake_file} ia64/t-ia64"
float_format=i386
;;
ia64*-*-linux*) ia64*-*-linux*)
tm_file="${tm_file} elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h" tm_file="${tm_file} elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc" tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc"
......
...@@ -27,6 +27,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -27,6 +27,9 @@ Boston, MA 02111-1307, USA. */
Loren J. Rittle <ljrittle@acm.org>. */ Loren J. Rittle <ljrittle@acm.org>. */
/* To help with rs6000/sysv4.h carnal knowledge problem. */
#define _USING_CONFIG_FREEBSD 1
/* This defines which switch letters take arguments. On FreeBSD, most of /* This defines which switch letters take arguments. On FreeBSD, most of
the normal cases (defined in gcc.c) apply, and we also have -h* and the normal cases (defined in gcc.c) apply, and we also have -h* and
-z* options (for the linker) (coming from SVR4). -z* options (for the linker) (coming from SVR4).
...@@ -41,6 +44,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -41,6 +44,8 @@ Boston, MA 02111-1307, USA. */
#undef SWITCH_TAKES_ARG #undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR)) #define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR))
/* This defines which multi-letter switches take arguments. */
#define FBSD_WORD_SWITCH_TAKES_ARG(STR) \ #define FBSD_WORD_SWITCH_TAKES_ARG(STR) \
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|| !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link") \ || !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link") \
...@@ -52,27 +57,27 @@ Boston, MA 02111-1307, USA. */ ...@@ -52,27 +57,27 @@ Boston, MA 02111-1307, USA. */
#if FBSD_MAJOR == 6 #if FBSD_MAJOR == 6
#define FBSD_CPP_PREDEFINES \ #define FBSD_CPP_PREDEFINES \
"-D__FreeBSD__=6 -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" "-D__FreeBSD__=6 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif #endif
#if FBSD_MAJOR == 5 #if FBSD_MAJOR == 5
#define FBSD_CPP_PREDEFINES \ #define FBSD_CPP_PREDEFINES \
"-D__FreeBSD__=5 -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" "-D__FreeBSD__=5 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif #endif
#if FBSD_MAJOR == 4 #if FBSD_MAJOR == 4
#define FBSD_CPP_PREDEFINES \ #define FBSD_CPP_PREDEFINES \
"-D__FreeBSD__=4 -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" "-D__FreeBSD__=4 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif #endif
#if FBSD_MAJOR == 3 #if FBSD_MAJOR == 3
#define FBSD_CPP_PREDEFINES \ #define FBSD_CPP_PREDEFINES \
"-D__FreeBSD__=3 -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" "-D__FreeBSD__=3 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif #endif
#ifndef FBSD_CPP_PREDEFINES #ifndef FBSD_CPP_PREDEFINES
#define FBSD_CPP_PREDEFINES \ #define FBSD_CPP_PREDEFINES \
"-D__FreeBSD__ -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" "-D__FreeBSD__ -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif #endif
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
...@@ -81,11 +86,35 @@ Boston, MA 02111-1307, USA. */ ...@@ -81,11 +86,35 @@ Boston, MA 02111-1307, USA. */
/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC /* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC
option `-posix', and PIC issues. */ option `-posix', and PIC issues. */
#undef CPP_SPEC #define FBSD_CPP_SPEC " \
#define CPP_SPEC "%(cpp_cpu) \ %(cpp_cpu) \
%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \
%{posix:-D_POSIX_SOURCE}" %{posix:-D_POSIX_SOURCE}"
#undef CPP_SPEC
#define CPP_SPEC FBSD_CPP_SPEC
/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add
the magical crtbegin.o file (see crtstuff.c) which provides part
of the support for getting C++ file-scope static object constructed
before entering `main'. */
#define FBSD_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}"
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
the magical crtend.o file (see crtstuff.c) which provides part of
the support for getting C++ file-scope static object constructed
before entering `main', followed by a normal "finalizer" file,
`crtn.o'. */
#define FBSD_ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as /* Provide a LIB_SPEC appropriate for FreeBSD as configured and as
required by the user-land thread model. Before __FreeBSD_version required by the user-land thread model. Before __FreeBSD_version
500016, select the appropriate libc, depending on whether we're 500016, select the appropriate libc, depending on whether we're
...@@ -100,9 +129,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -100,9 +129,12 @@ Boston, MA 02111-1307, USA. */
misconfigured the gcc bootstrap but are later consulting FreeBSD misconfigured the gcc bootstrap but are later consulting FreeBSD
manual pages that refer to the mythical -pthread option). */ manual pages that refer to the mythical -pthread option). */
#undef LIB_SPEC /* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
libc, depending on whether we're doing profiling or need threads support.
(simular to the default, except no -lg, and no -p). */
#ifdef FBSD_NO_THREADS #ifdef FBSD_NO_THREADS
#define LIB_SPEC " \ #define FBSD_LIB_SPEC " \
%{pthread: %eThe -pthread option is only supported on FreeBSD when gcc \ %{pthread: %eThe -pthread option is only supported on FreeBSD when gcc \
is built with the --enable-threads configure-time option.} \ is built with the --enable-threads configure-time option.} \
%{!shared: \ %{!shared: \
...@@ -111,13 +143,13 @@ is built with the --enable-threads configure-time option.} \ ...@@ -111,13 +143,13 @@ is built with the --enable-threads configure-time option.} \
}" }"
#else #else
#if FBSD_MAJOR >= 5 #if FBSD_MAJOR >= 5
#define LIB_SPEC " \ #define FBSD_LIB_SPEC " \
%{!shared: \ %{!shared: \
%{!pg: %{pthread:-lc_r} -lc} \ %{!pg: %{pthread:-lc_r} -lc} \
%{pg: %{pthread:-lc_r_p} -lc_p} \ %{pg: %{pthread:-lc_r_p} -lc_p} \
}" }"
#else #else
#define LIB_SPEC " \ #define FBSD_LIB_SPEC " \
%{!shared: \ %{!shared: \
%{!pg: \ %{!pg: \
%{!pthread:-lc} \ %{!pthread:-lc} \
...@@ -129,9 +161,21 @@ is built with the --enable-threads configure-time option.} \ ...@@ -129,9 +161,21 @@ is built with the --enable-threads configure-time option.} \
#endif #endif
#endif #endif
/* Code generation parameters. */ #undef LIB_SPEC
#define LIB_SPEC FBSD_LIB_SPEC
/************************[ Target stuff ]***********************************/
/* Don't assume anything about the header files. */
#undef NO_IMPLICIT_EXTERN_C
#define NO_IMPLICIT_EXTERN_C
/* Allow #sccs in preprocessor. */
#undef SCCS_DIRECTIVE
#define SCCS_DIRECTIVE
/* Make gcc agree with <machine/ansi.h>. */ /* Make gcc agree with FreeBSD's standard headers (<machine/ansi.h>, etc...) */
#undef WCHAR_TYPE #undef WCHAR_TYPE
#define WCHAR_TYPE "int" #define WCHAR_TYPE "int"
...@@ -139,6 +183,8 @@ is built with the --enable-threads configure-time option.} \ ...@@ -139,6 +183,8 @@ is built with the --enable-threads configure-time option.} \
#undef WCHAR_UNSIGNED #undef WCHAR_UNSIGNED
#define WCHAR_UNSIGNED 0 #define WCHAR_UNSIGNED 0
/* Code generation parameters. */
/* Don't default to pcc-struct-return, because gcc is the only compiler, and /* Don't default to pcc-struct-return, because gcc is the only compiler, and
we want to retain compatibility with older gcc versions we want to retain compatibility with older gcc versions
(even though the SVR4 ABI for the i386 says that records and unions are (even though the SVR4 ABI for the i386 says that records and unions are
...@@ -146,32 +192,50 @@ is built with the --enable-threads configure-time option.} \ ...@@ -146,32 +192,50 @@ is built with the --enable-threads configure-time option.} \
#undef DEFAULT_PCC_STRUCT_RETURN #undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0 #define DEFAULT_PCC_STRUCT_RETURN 0
/* Ensure we the configuration knows our system correctly so we can link with /* Use periods rather than dollar signs in special g++ assembler names.
libraries compiled with the native cc. */ This ensures the configuration knows our system correctly so we can link
with libraries compiled with the native cc. */
#undef NO_DOLLAR_IN_LABEL #undef NO_DOLLAR_IN_LABEL
/* The GNU tools operate better with dwarf2 than stabs. Since we /* The prefix to add to user-visible assembler symbols.
don't have any native tools to be compatible with, default to For System V Release 4 & ELF the convention is *not* to prepend a leading
dwarf2. */ underscore onto user-level symbol names. Some CPU files such as
#undef PREFERRED_DEBUGGING_TYPE config/sparc/sparc.h set this wrong for ELF. */
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""
/* Handle #pragma weak and #pragma pack. */
#undef HANDLE_SYSV_PRAGMA
#define HANDLE_SYSV_PRAGMA
/* Use more efficient ``thunks'' to implement C++ vtables. */
#undef DEFAULT_VTABLE_THUNKS
#define DEFAULT_VTABLE_THUNKS 1
/************************[ Assembler stuff ]********************************/
#undef IDENT_ASM_OP #undef IDENT_ASM_OP
#define IDENT_ASM_OP "\t.ident\t" #define IDENT_ASM_OP "\t.ident\t"
/* Output #ident as a .ident. */ /* Output #ident as a .ident. */
#undef ASM_OUTPUT_IDENT #undef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(FILE, NAME) \ #define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf ((FILE), "%s\"%s\"\n", IDENT_ASM_OP, (NAME)); fprintf ((FILE), "%s\"%s\"\n", IDENT_ASM_OP, (NAME));
/* Miscellaneous parameters. */ /************************[ Debugger stuff ]*********************************/
/* Don't assume anything about the header files. */ /* All ELF targets can support DWARF-2. */
#undef NO_IMPLICIT_EXTERN_C #undef DWARF2_DEBUGGING_INFO
#define NO_IMPLICIT_EXTERN_C #define DWARF2_DEBUGGING_INFO
/* Allow #sccs in preprocessor. */ /* This is BSD, so we want the DBX format. */
#define SCCS_DIRECTIVE #undef DBX_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO
/* Handle #pragma weak and #pragma pack. */ /* Even though this is BSD, ELF and the GNU tools operates better with dwarf2
#define HANDLE_SYSV_PRAGMA than stabs. Since we don't have any native tools to be compatible with,
defaulting to dwarf2 is OK. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
...@@ -22,6 +22,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,6 +22,11 @@ Boston, MA 02111-1307, USA. */
/* AIX5 (aka Monterey): a mix of AIX and UnixWare. /* AIX5 (aka Monterey): a mix of AIX and UnixWare.
This file is loosely based on ia64/linux.h. */ This file is loosely based on ia64/linux.h. */
/* This macro is a C statement to print on `stderr' a string describing the
particular machine description choice. */
#define TARGET_VERSION fprintf (stderr, " (IA-64) AIX");
#undef ASM_APP_ON #undef ASM_APP_ON
#define ASM_APP_ON "#APP\n" #define ASM_APP_ON "#APP\n"
......
/* Definitions for embedded ia64-elf target. */ /* Definitions for embedded ia64-elf target. */
/* TODO: convert includes to ${tm_file} list in config.gcc. */ /* This macro is a C statement to print on `stderr' a string describing the
#include "ia64/ia64.h" particular machine description choice. */
#include "elfos.h"
#include "sysv4.h" #define TARGET_VERSION fprintf (stderr, " (IA-64) ELF");
/* Define this to be a string constant containing `-D' options to define the
predefined macros that identify this machine and system. These macros will
be predefined unless the `-ansi' option is specified. */
/* ??? This is undefed in svr4.h. */
#define CPP_PREDEFINES "-Dia64 -Amachine=ia64"
/* A C string constant that tells the GNU CC driver program options to pass to
the assembler. It can also specify how to translate options you give to GNU
CC into options for GNU CC to pass to the assembler. */
#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GNU_AS) != 0
/* GNU AS. */
#define ASM_SPEC \
"%{mno-gnu-as:-N so} %{!mno-gnu-as:-x} %{mconstant-gp} %{mauto-pic}"
#else
/* Intel ias. */
#define ASM_SPEC \
"%{!mgnu-as:-N so} %{mgnu-as:-x} %{mconstant-gp:-M const_gp}\
%{mauto-pic:-M no_plabel}"
#endif
/* A C string constant that tells the GNU CC driver program options to pass to
the linker. It can also specify how to translate options you give to GNU CC
into options for GNU CC to pass to the linker. */
/* The Intel linker does not support dynamic linking, so we need -dn.
The Intel linker gives annoying messages unless -N so is used. */
#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GNU_LD) != 0
/* GNU LD. */
#define LINK_SPEC "%{mno-gnu-ld:-dn -N so}"
#else
/* Intel ild. */
#define LINK_SPEC "%{!mgnu-ld:-dn -N so}"
#endif
/* svr4.h links with crti.o/crtn.o, but elfos.h does not. We override elfos.h /* svr4.h links with crti.o/crtn.o, but elfos.h does not. We override elfos.h
so that we can use the standard ELF Unix method. */ so that we can use the standard ELF Unix method. */
......
/* Definitions for Intel IA-64 running FreeBSD using the ELF format
Copyright (C) 2001 Free Software Foundation, Inc.
Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
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. */
#undef LINK_SPEC
#define LINK_SPEC \
"%{p:%e`-p' not supported; use `-pg' and gprof(1)} \
%{Wl,*:%*} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
%{symbolic:-Bsymbolic} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}} \
%{static:-Bstatic}}"
#undef ASM_SPEC
#define ASM_SPEC "-x %{mconstant-gp} %{mauto-pic}"
/************************[ Target stuff ]***********************************/
/* Define the actual types of some ANSI-mandated types.
Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.c,
c-common.c, and config/<arch>/<arch>.h. */
/* Earilier headers may get this wrong for FreeBSD.
We use the GCC defaults instead. */
#undef WCHAR_TYPE
#undef WCHAR_UNSIGNED
#define WCHAR_UNSIGNED 0
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (FreeBSD/IA-64 ELF)");
#define TARGET_ELF 1
#define DONT_USE_BUILTIN_SETJMP
#define JMP_BUF_SIZE 76
/* Output any profiling code before the prologue. */
#undef PROFILE_BEFORE_PROLOGUE
#define PROFILE_BEFORE_PROLOGUE 1
...@@ -20,6 +20,11 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -20,6 +20,11 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* This macro is a C statement to print on `stderr' a string describing the
particular machine description choice. */
#define TARGET_VERSION fprintf (stderr, " (IA-64) HP-UX");
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
#define CPP_PREDEFINES "\ #define CPP_PREDEFINES "\
-D__IA64__ -D__ia64 -D__ia64__ -D__hpux -D__hpux__ -Dhpux -Dunix \ -D__IA64__ -D__ia64 -D__ia64__ -D__hpux -D__hpux__ -Dhpux -Dunix \
......
...@@ -31,11 +31,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,11 +31,11 @@ Boston, MA 02111-1307, USA. */
/* Run-time target specifications */ /* Run-time target specifications */
/* Define this to be a string constant containing `-D' options to define the #define CPP_CPU_SPEC "\
predefined macros that identify this machine and system. These macros will -Acpu=ia64 -Amachine=ia64 \
be predefined unless the `-ansi' option is specified. */ %{!ansi:%{!std=c*:%{!std=i*:-Dia64}}} -D__ia64 -D__ia64__"
/* ??? This is undefed in svr4.h. */
#define CPP_PREDEFINES "-Dia64 -Amachine=ia64" #define CC1_SPEC "%(cc1_cpu) "
/* This declaration should be present. */ /* This declaration should be present. */
extern int target_flags; extern int target_flags;
...@@ -176,11 +176,6 @@ extern const char *ia64_fixed_range_string; ...@@ -176,11 +176,6 @@ extern const char *ia64_fixed_range_string;
N_("Specify range of registers to make fixed.")}, \ N_("Specify range of registers to make fixed.")}, \
} }
/* This macro is a C statement to print on `stderr' a string describing the
particular machine description choice. */
#define TARGET_VERSION fprintf (stderr, " (IA-64)");
/* Sometimes certain combinations of command options do not make sense on a /* Sometimes certain combinations of command options do not make sense on a
particular target machine. You can define a macro `OVERRIDE_OPTIONS' to particular target machine. You can define a macro `OVERRIDE_OPTIONS' to
take account of this. This macro, if defined, is executed once just after take account of this. This macro, if defined, is executed once just after
...@@ -243,36 +238,6 @@ extern const char *ia64_fixed_range_string; ...@@ -243,36 +238,6 @@ extern const char *ia64_fixed_range_string;
/* #define CC1PLUS_SPEC "" */ /* #define CC1PLUS_SPEC "" */
/* A C string constant that tells the GNU CC driver program options to pass to
the assembler. It can also specify how to translate options you give to GNU
CC into options for GNU CC to pass to the assembler. */
#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GNU_AS) != 0
/* GNU AS. */
#define ASM_SPEC \
"%{mno-gnu-as:-N so} %{!mno-gnu-as:-x} %{mconstant-gp} %{mauto-pic}"
#else
/* Intel ias. */
#define ASM_SPEC \
"%{!mgnu-as:-N so} %{mgnu-as:-x} %{mconstant-gp:-M const_gp}\
%{mauto-pic:-M no_plabel}"
#endif
/* A C string constant that tells the GNU CC driver program options to pass to
the linker. It can also specify how to translate options you give to GNU CC
into options for GNU CC to pass to the linker. */
/* The Intel linker does not support dynamic linking, so we need -dn.
The Intel linker gives annoying messages unless -N so is used. */
#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GNU_LD) != 0
/* GNU LD. */
#define LINK_SPEC "%{mno-gnu-ld:-dn -N so}"
#else
/* Intel ild. */
#define LINK_SPEC "%{!mgnu-ld:-dn -N so}"
#endif
/* Storage Layout */ /* Storage Layout */
/* Define this macro to have the value 1 if the most significant bit in a byte /* Define this macro to have the value 1 if the most significant bit in a byte
...@@ -1570,21 +1535,24 @@ do { \ ...@@ -1570,21 +1535,24 @@ do { \
/* A C statement or compound statement to output to FILE some assembler code to /* A C statement or compound statement to output to FILE some assembler code to
call the profiling subroutine `mcount'. */ call the profiling subroutine `mcount'. */
/* ??? Unclear if this will actually work. No way to test this currently. */ #undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \ #define FUNCTION_PROFILER(FILE, LABELNO) \
do { \ do { \
char buf[20]; \ char buf[20]; \
ASM_GENERATE_INTERNAL_LABEL (buf, "LP", LABELNO); \ ASM_GENERATE_INTERNAL_LABEL (buf, "LP", LABELNO); \
fputs ("\taddl r16 = @ltoff(", FILE); \ fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", FILE); \
if (TARGET_AUTO_PIC) \
fputs ("\tmovl out3 = @gprel(", FILE); \
else \
fputs ("\taddl out3 = @ltoff(", FILE); \
assemble_name (FILE, buf); \ assemble_name (FILE, buf); \
fputs ("), gp\n", FILE); \ if (TARGET_AUTO_PIC) \
fputs ("\tmov r17 = r1;;\n", FILE); \ fputs (");;\n", FILE); \
fputs ("\tld8 out0 = [r16]\n", FILE); \ else \
fputs ("\tmov r18 = b0\n", FILE); \ fputs ("), r1;;\n", FILE); \
fputs ("\tbr.call.sptk.many rp = mcount;;\n", FILE); \ fputs ("\tmov out1 = r1\n", FILE); \
fputs ("\tmov b0 = r18\n", FILE); \ fputs ("\tmov out2 = b0\n", FILE); \
fputs ("\tmov r1 = r17;;\n", FILE); \ fputs ("\tbr.call.sptk.many b0 = _mcount;;\n", FILE); \
} while (0) } while (0)
/* A C statement or compound statement to output to FILE some assembler code to /* A C statement or compound statement to output to FILE some assembler code to
......
/* Definitions for ia64-linux target. */ /* Definitions for ia64-linux target. */
/* This macro is a C statement to print on `stderr' a string describing the
particular machine description choice. */
#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
/* This is for -profile to use -lc_p instead of -lc. */ /* This is for -profile to use -lc_p instead of -lc. */
#undef CC1_SPEC #undef CC1_SPEC
#define CC1_SPEC "%{profile:-p} %{G*}" #define CC1_SPEC "%{profile:-p} %{G*}"
...@@ -40,27 +45,4 @@ ...@@ -40,27 +45,4 @@
#undef PROFILE_BEFORE_PROLOGUE #undef PROFILE_BEFORE_PROLOGUE
#define PROFILE_BEFORE_PROLOGUE 1 #define PROFILE_BEFORE_PROLOGUE 1
/* A C statement or compound statement to output to FILE some assembler code to
call the profiling subroutine `mcount'. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
do { \
char buf[20]; \
ASM_GENERATE_INTERNAL_LABEL (buf, "LP", LABELNO); \
fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", FILE); \
if (TARGET_AUTO_PIC) \
fputs ("\tmovl out3 = @gprel(", FILE); \
else \
fputs ("\taddl out3 = @ltoff(", FILE); \
assemble_name (FILE, buf); \
if (TARGET_AUTO_PIC) \
fputs (");;\n", FILE); \
else \
fputs ("), r1;;\n", FILE); \
fputs ("\tmov out1 = r1\n", FILE); \
fputs ("\tmov out2 = b0\n", FILE); \
fputs ("\tbr.call.sptk.many b0 = _mcount;;\n", FILE); \
} while (0)
/* End of linux.h */ /* End of linux.h */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment