171 lines
5.4 KiB
C
171 lines
5.4 KiB
C
/* $Id: tm.h,v 1.6 1995/06/05 01:59:23 pk Exp $ */
|
|
|
|
#include <machine/ansi.h>
|
|
#include "m68k/m68k.h"
|
|
|
|
/* See m68k.h. 7 means 68020 with 68881. */
|
|
|
|
#define TARGET_DEFAULT 7
|
|
|
|
/* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
|
|
This will control the use of inline 68881 insns in certain macros. */
|
|
|
|
#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}"
|
|
|
|
/* Names to predefine in the preprocessor for this target machine. */
|
|
|
|
#define CPP_PREDEFINES "-Dm68k -Dmc68000 -Dmc68020 -Dunix -D__NetBSD__ -D__m68k__"
|
|
|
|
/* Specify -k to assembler for PIC code generation. */
|
|
|
|
#define ASM_SPEC "%{fpic:-k} %{fPIC:-k}"
|
|
|
|
/* Support -static, -symbolic and -shared options (at least minimally).
|
|
Also use -dp when doing dynamic linking. Don't include a startup
|
|
file when linking a shared library. */
|
|
|
|
#define LINK_SPEC \
|
|
"%{static:-Bstatic} %{shared:-Bshareable} %{symbolic:-Bsymbolic} \
|
|
%{!static:%{!shared:-dp}}"
|
|
|
|
#define STARTFILE_SPEC \
|
|
"%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}\
|
|
%{!p:%{static:scrt0.o%s}%{!static:crt0.o%s}}}}"
|
|
|
|
/* No more libg.a; no libraries if making shared object */
|
|
|
|
#define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
|
|
|
|
/* Make gcc agree with <machine/ansi.h> */
|
|
|
|
#define SIZE_TYPE "unsigned int"
|
|
#define PTRDIFF_TYPE "int"
|
|
#undef WCHAR_TYPE
|
|
#define WCHAR_TYPE "short unsigned int"
|
|
#define WCHAR_UNSIGNED 1
|
|
#undef WCHAR_TYPE_SIZE
|
|
#define WCHAR_TYPE_SIZE 16
|
|
|
|
/* NetBSD does have atexit. */
|
|
|
|
#define HAVE_ATEXIT
|
|
|
|
/* Every structure or union's size must be a multiple of 2 bytes. */
|
|
|
|
#define STRUCTURE_SIZE_BOUNDARY 16
|
|
|
|
/* This is BSD, so it wants DBX format. */
|
|
|
|
#define DBX_DEBUGGING_INFO
|
|
|
|
/* Do not break .stabs pseudos into continuations. */
|
|
|
|
#define DBX_CONTIN_LENGTH 0
|
|
|
|
/* This is the char to use for continuation (in case we need to turn
|
|
continuation back on). */
|
|
|
|
#define DBX_CONTIN_CHAR '?'
|
|
|
|
/* Don't use the `xsfoo;' construct in DBX output; this system
|
|
doesn't support it. */
|
|
|
|
#define DBX_NO_XREFS
|
|
|
|
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
|
|
we want to retain compatibility with older gcc versions. */
|
|
#define DEFAULT_PCC_STRUCT_RETURN 0
|
|
|
|
/*
|
|
* Some imports from svr4.h in support of shared libraries.
|
|
*/
|
|
|
|
#define HANDLE_SYSV_PRAGMA
|
|
|
|
/* Define the strings used for the special svr4 .type and .size directives.
|
|
These strings generally do not vary from one system running svr4 to
|
|
another, but if a given system (e.g. m88k running svr) needs to use
|
|
different pseudo-op names for these, they may be overridden in the
|
|
file which includes this one. */
|
|
|
|
#define TYPE_ASM_OP ".type"
|
|
#define SIZE_ASM_OP ".size"
|
|
#define WEAK_ASM_OP ".weak"
|
|
#define SET_ASM_OP ".set"
|
|
|
|
/* The following macro defines the format used to output the second
|
|
operand of the .type assembler directive. Different svr4 assemblers
|
|
expect various different forms for this operand. The one given here
|
|
is just a default. You may need to override it in your machine-
|
|
specific tm.h file (depending upon the particulars of your assembler). */
|
|
|
|
#define TYPE_OPERAND_FMT "@%s"
|
|
|
|
/* Write the extra assembler code needed to declare a function's result.
|
|
Most svr4 assemblers don't require any special declaration of the
|
|
result value, but there are exceptions. */
|
|
|
|
#ifndef ASM_DECLARE_RESULT
|
|
#define ASM_DECLARE_RESULT(FILE, RESULT)
|
|
#endif
|
|
|
|
/* These macros generate the special .type and .size directives which
|
|
are used to set the corresponding fields of the linker symbol table
|
|
entries in an ELF object file under SVR4. These macros also output
|
|
the starting labels for the relevant functions/objects. */
|
|
|
|
/* Write the extra assembler code needed to declare a function properly.
|
|
Some svr4 assemblers need to also have something extra said about the
|
|
function's return value. We allow for that here. */
|
|
|
|
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
|
|
do { \
|
|
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
|
|
assemble_name (FILE, NAME); \
|
|
putc (',', FILE); \
|
|
fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
|
|
putc ('\n', FILE); \
|
|
ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
|
|
ASM_OUTPUT_LABEL(FILE, NAME); \
|
|
} while (0)
|
|
|
|
/* Write the extra assembler code needed to declare an object properly. */
|
|
|
|
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
|
|
do { \
|
|
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
|
|
assemble_name (FILE, NAME); \
|
|
putc (',', FILE); \
|
|
fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
|
|
putc ('\n', FILE); \
|
|
if (!flag_inhibit_size_directive) \
|
|
{ \
|
|
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
|
|
assemble_name (FILE, NAME); \
|
|
fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (decl))); \
|
|
} \
|
|
ASM_OUTPUT_LABEL(FILE, NAME); \
|
|
} while (0)
|
|
|
|
/* This is how to declare the size of a function. */
|
|
|
|
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
|
|
do { \
|
|
if (!flag_inhibit_size_directive) \
|
|
{ \
|
|
char label[256]; \
|
|
static int labelno; \
|
|
labelno++; \
|
|
ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
|
|
ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
|
|
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
|
|
assemble_name (FILE, (FNAME)); \
|
|
fprintf (FILE, ","); \
|
|
assemble_name (FILE, label); \
|
|
fprintf (FILE, "-"); \
|
|
assemble_name (FILE, (FNAME)); \
|
|
putc ('\n', FILE); \
|
|
} \
|
|
} while (0)
|
|
|