📄 netbsd-elf.h
字号:
/* Definitions of target machine for GNU compiler, for m68k (including m68010) NetBSD platforms using the ELF object format. Copyright (C) 2002 Free Software Foundation, Inc. Contributed by Wasabi Systems. Inc. This file is derived from <m68k/m68kv4.h>, <m68k/m68kelf.h>, and <m68k/linux.h>.This file is part of GNU CC.GNU CC is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 1, 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU CC; see the file COPYING. If not, write tothe Free Software Foundation, 59 Temple Place - Suite 330,Boston, MA 02111-1307, USA. *//* Default target comes from config.gcc */#undef TARGET_DEFAULT#define TARGET_DEFAULT TARGET_CPU_DEFAULT/* Don't try using XFmode on the 68010. */ #if TARGET_DEFAULT == 0#undef LONG_DOUBLE_TYPE_SIZE#define LONG_DOUBLE_TYPE_SIZE 64/* Use software floating point emulator for REAL_ARITHMETIC and decimal <-> binary conversion. */#define REAL_ARITHMETIC#endif#ifdef __mc68010__#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64#else#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96#endif#define EXTRA_SPECS \ { "cpp_cpu_default_spec", CPP_CPU_DEFAULT_SPEC }, \ { "cpp_cpu_spec", CPP_CPU_SPEC }, \ { "cpp_fpu_spec", CPP_FPU_SPEC }, \ { "asm_default_spec", ASM_DEFAULT_SPEC },#define CPP_CPU_SPEC \ "%{m68010:-D__mc68010__} \ %{m68020:-D__mc68020__} \ %{m68030:-D__mc68030__} \ %{m68040:-D__mc68040__} \ %(cpp_cpu_default_spec)"#undef TARGET_VERSION#if TARGET_DEFAULT & MASK_68020#define TARGET_VERSION fprintf (stderr, " (NetBSD/m68k ELF)");#define CPP_CPU_DEFAULT_SPEC "%{!m680*:-D__mc68020__}"#define ASM_DEFAULT_SPEC "%{!m680*:-m68020}"#else#define TARGET_VERSION fprintf (stderr, " (NetBSD/68010 ELF)");#define CPP_CPU_DEFAULT_SPEC "%{!m680*:-D__mc68010__}"#define ASM_DEFAULT_SPEC "%{!m680*:-m68010}"#endif#if TARGET_DEFAULT & MASK_68881#define CPP_FPU_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__}"#else#define CPP_FPU_SPEC "%{m68881:-D__HAVE_68881__ -D__HAVE_FPU__}"#endif/* Provide a CPP_SPEC appropriate for NetBSD m68k targets. Currently we deal with the GCC option '-posix', as well as an indication as to whether or not use of the FPU is allowed. */#undef CPP_SPEC#define CPP_SPEC \ "%{posix:-D_POSIX_SOURCE} %(cpp_cpu_spec) %(cpp_fpu_spec)"/* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We pass on some CPU options, as well as PIC code generation options. */#undef ASM_SPEC#define ASM_SPEC \ " %| %(asm_default_spec) \ %{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \ %{fpic:-k} %{fPIC:-k -K}"/* Provide a set of CPP pre-definitions and pre-assertions appropriate for NetBSD m68k ELF targets (using the SVR4 ABI). */#undef CPP_PREDEFINES#define CPP_PREDEFINES \ "-D__NetBSD__ -D__ELF__ -D__m68k__ -D__SVR4_ABI__ -D__motorola__ \ -Asystem=unix -Asystem=NetBSD -Acpu=m68k -Amachine=m68k"/* Provide a LINK_SPEC appropriate for a NetBSD/m68k ELF target. This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for the m68k target. */#undef LINK_SPEC#define LINK_SPEC \ "%{assert*} %{R*} \ %{shared:-shared} \ %{!shared: \ -dc -dp \ %{!nostdlib: \ %{!r*: \ %{!e*:-e _start}}} \ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ %{static:-static}}"/* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function only. */#undef FUNCTION_PROFILER#define FUNCTION_PROFILER(FILE, LABELNO) \do \ { \ asm_fprintf (FILE, "\tlea (%LLP%d,%Rpc),%Ra1\n", (LABELNO)); \ if (flag_pic) \ fprintf (FILE, "\tbsr.l __mcount@PLTPC\n"); \ else \ fprintf (FILE, "\tjbsr __mcount\n"); \ } \while (0)/* Make gcc agree with <machine/ansi.h> */#undef SIZE_TYPE#define SIZE_TYPE "unsigned int"#undef PTRDIFF_TYPE#define PTRDIFF_TYPE "int"/* XXX Here is a bunch of stuff lifted from m68kelf.h. We don't use that file directly, because it has a lot of baggage we don't want. */#define MOTOROLA /* Use Motorola syntax */#define USE_GAS /* But GAS wants jbsr instead of jsr *//* The prefix for register names. Note that REGISTER_NAMES is supposed to include this prefix. Also note that this is NOT an fprintf format string, it is a literal string. */#undef REGISTER_PREFIX#define REGISTER_PREFIX "%"/* The prefix for local (compiler generated) lables. These labels will not appear in the symbol table. */#undef LOCAL_LABEL_PREFIX#define LOCAL_LABEL_PREFIX "."/* The prefix to add to user-visible assembler symbols. */#undef USER_LABEL_PREFIX#define USER_LABEL_PREFIX ""/* The prefix for immediate operands. */#undef IMMEDIATE_PREFIX#define IMMEDIATE_PREFIX "#"#undef ASM_COMMENT_START#define ASM_COMMENT_START "|"/* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number. Motorola format uses different register names than defined in m68k.h. We also take this chance to convert 'a6' to 'fp' */#undef REGISTER_NAMES#ifndef SUPPORT_SUN_FPA#define REGISTER_NAMES \{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp", \ "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" }#else /* SUPPORT_SUN_FPA */#define REGISTER_NAMES \{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp", \ "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \ "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6","%fpa7", \ "%fpa8", "%fpa9", "%fpa10","%fpa11","%fpa12","%fpa13","%fpa14","%fpa15", \ "%fpa16","%fpa17","%fpa18","%fpa19","%fpa20","%fpa21","%fpa22","%fpa23", \ "%fpa24","%fpa25","%fpa26","%fpa27","%fpa28","%fpa29","%fpa30","%fpa31" }#endif /* ! SUPPORT_SUN_FPA *//* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to keep switch tables in the text section. */#undef JUMP_TABLES_IN_TEXT_SECTION#define JUMP_TABLES_IN_TEXT_SECTION 1/* Use the default action for outputting the case label. */#undef ASM_OUTPUT_CASE_LABEL#define ASM_RETURN_CASE_JUMP \do \ { \ if (TARGET_5200) \ return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \ else \ return "jmp %%pc@(2,%0:w)"; \ } \while (0)/* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. */#undef ASM_OUTPUT_ALIGN#define ASM_OUTPUT_ALIGN(FILE,LOG) \do \ { \ if ((LOG) > 0) \ fprintf ((FILE), "%s%u\n", ALIGN_ASM_OP, 1 << (LOG)); \ } \while (0)/* If defined, a C expression whose value is a string containing the assembler operation to identify the following data as uninitialized global data. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -