#include <stdio.h>
#include "i386/sysv4.h"
#define _sys_siglist sys_siglist
extern char *sys_siglist[];
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386 OSF/1)");
#undef WORD_SWITCH_TAKES_ARG
#define WORD_SWITCH_TAKES_ARG(STR) \
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|| !strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \
|| !strcmp (STR, "Tbss") || !strcmp (STR, "soname"))
#undef CPP_SPEC
#define CPP_SPEC "\
%{fpic: -D__SHARED__} %{fPIC: %{!fpic: -D__SHARED__}} \
%{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
%{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
%{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
%{.C: -D__LANGUAGE_C_PLUS_PLUS} \
%{.m: -D__LANGUAGE_OBJECTIVE_C} \
%{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
#undef CC1_SPEC
#define CC1_SPEC "%{p: %{!mmcount: %{!mno-mcount: -mno-mcount }}} \
%{!p: %{pg: %{!mmcount: %{!mno-mcount: -mno-mcount }}}}"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-D__NO_UNDERSCORES__ -D__ELF__ -DOSF -DOSF1 -Di386 -Dunix -Asystem(xpg4) -Asystem(osf1) -Acpu(i386) -Amachine(i386)"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared: \
%{!symbolic: \
%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
crti.o%s \
crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#undef ASM_SPEC
#define ASM_SPEC "%{v*: -v}"
#undef LINK_SPEC
#define LINK_SPEC "%{v*: -v} \
%{h*} %{z*} \
%{dy:-call_shared} %{dn:-static} \
%{static:-static} \
%{shared:-shared} \
%{call_shared:-call_shared} \
%{symbolic:-Bsymbolic -shared -call_shared} \
%{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \
%{noshrlib: -static } \
%{!noshrlib: -call_shared}}}}}}"
#undef MD_EXEC_PREFIX
#define MD_EXEC_PREFIX "/usr/ccs/gcc/"
#undef MD_STARTFILE_PREFIX
#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
#define LINK_LIBGCC_SPECIAL
#undef LIBGCC_SPEC
#define LIBGCC_SPEC "%{!shared:%{!symbolic:libgcc.a%s}}"
#undef ASM_IDENTIFY_GCC
#define ASM_IDENTIFY_GCC(FILE)
#define ASM_IDENTIFY_LANGUAGE(STREAM) \
{ \
if (strcmp (lang_identify (), "c") != 0) \
output_lang_identify (STREAM); \
}
#undef SIZE_TYPE
#undef PTRDIFF_TYPE
#undef WCHAR_TYPE
#undef WCHAR_TYPE_SIZE
#define SIZE_TYPE "long unsigned int"
#define PTRDIFF_TYPE "int"
#define WCHAR_TYPE "unsigned int"
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
#define MASK_NO_MCOUNT 000200000000
#define TARGET_MCOUNT ((target_flags & MASK_NO_MCOUNT) == 0)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "mcount", -MASK_NO_MCOUNT, "Profiling uses mcount" }, \
{ "no-mcount", MASK_NO_MCOUNT, "" },
#if 0
#define OSF_PROFILE_BEFORE_PROLOGUE \
(!TARGET_MCOUNT \
&& !current_function_needs_context \
&& (!flag_pic \
|| !frame_pointer_needed \
|| (!current_function_uses_pic_offset_table \
&& !current_function_uses_const_pool)))
#else
#define OSF_PROFILE_BEFORE_PROLOGUE 0
#endif
#undef FUNCTION_PROLOGUE
#define FUNCTION_PROLOGUE(FILE, SIZE) \
do \
{ \
char *prefix = ""; \
char *lprefix = LPREFIX; \
int labelno = profile_label_no; \
\
if (profile_flag && OSF_PROFILE_BEFORE_PROLOGUE) \
{ \
if (!flag_pic) \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tcall *%s_mcount_ptr\n", prefix); \
} \
\
else \
{ \
static int call_no = 0; \
\
fprintf (FILE, "\tcall %sPc%d\n", lprefix, call_no); \
fprintf (FILE, "%sPc%d:\tpopl %%eax\n", lprefix, call_no); \
fprintf (FILE, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-%sPc%d],%%eax\n", \
lprefix, call_no++); \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%eax),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tmovl %s_mcount_ptr@GOT(%%eax),%%eax\n", \
prefix); \
fprintf (FILE, "\tcall *(%%eax)\n"); \
} \
} \
\
function_prologue (FILE, SIZE); \
} \
while (0)
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
do \
{ \
if (!OSF_PROFILE_BEFORE_PROLOGUE) \
{ \
char *prefix = ""; \
char *lprefix = LPREFIX; \
int labelno = LABELNO; \
\
\
\
if (flag_pic \
&& !current_function_uses_pic_offset_table \
&& !current_function_uses_const_pool) \
abort (); \
\
if (TARGET_MCOUNT && flag_pic) \
{ \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tcall *%smcount@GOT(%%ebx)\n", prefix); \
} \
\
else if (TARGET_MCOUNT) \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tcall %smcount\n", prefix); \
} \
\
else if (flag_pic && frame_pointer_needed) \
{ \
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
fprintf (FILE, "\tpushl %%ecx\n"); \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tmovl _mcount_ptr@GOT(%%ebx),%%eax\n"); \
fprintf (FILE, "\tcall *(%%eax)\n"); \
fprintf (FILE, "\tpopl %%eax\n"); \
} \
\
else if (frame_pointer_needed) \
{ \
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
fprintf (FILE, "\tpushl %%ecx\n"); \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tcall *_mcount_ptr\n"); \
fprintf (FILE, "\tpopl %%eax\n"); \
} \
\
else \
abort (); \
} \
} \
while (0)
#if defined (CROSS_COMPILE) && defined (HOST_BITS_PER_INT) && defined (HOST_BITS_PER_LONG) && defined (HOST_BITS_PER_LONGLONG)
#if (HOST_BITS_PER_INT==32) && (HOST_BITS_PER_LONG==64) && (HOST_BITS_PER_LONGLONG==64)
#define REAL_ARITHMETIC
#endif
#endif