⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m68k.h

📁 gcc库的原代码,对编程有很大帮助.
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions of target machine for GNU compiler.  Sun 68000/68020 version.   Copyright (C) 1987, 1988, 1993, 1994, 1995 Free Software Foundation, Inc.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 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 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.  *//* Note that some other tm.h files include this one and then override   many of the definitions that relate to assembler syntax.  *//* Names to predefine in the preprocessor for this target machine.  *//* See sun3.h, sun2.h, isi.h for different CPP_PREDEFINES.  *//* Print subsidiary information on the compiler version in use.  */#ifdef MOTOROLA#define TARGET_VERSION fprintf (stderr, " (68k, Motorola syntax)");#else#define TARGET_VERSION fprintf (stderr, " (68k, MIT syntax)");#endif/* Define SUPPORT_SUN_FPA to include support for generating code for   the Sun Floating Point Accelerator, an optional product for Sun 3   machines.  By default, it is not defined.  Avoid defining it unless   you need to output code for the Sun3+FPA architecture, as it has the   effect of slowing down the register set operations in hard-reg-set.h   (total number of registers will exceed number of bits in a long,   if defined, causing the set operations to expand to loops).   SUPPORT_SUN_FPA is typically defined in sun3.h.  *//* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;/* Macros used in the machine description to test the flags.  *//* Compile for a 68020 (not a 68000 or 68010).  */#define TARGET_68020 (target_flags & 1)/* Compile 68881 insns for floating point (not library calls).  */#define TARGET_68881 (target_flags & 2)/* Compile using 68020 bitfield insns.  */#define TARGET_BITFIELD (target_flags & 4)/* Compile using rtd insn calling sequence.   This will not work unless you use prototypes at least   for all functions that can take varying numbers of args.  */#define TARGET_RTD (target_flags & 8)/* Compile passing first two args in regs 0 and 1.   This exists only to test compiler features that will   be needed for RISC chips.  It is not usable   and is not intended to be usable on this cpu.  */#define TARGET_REGPARM (target_flags & 020)/* Compile with 16-bit `int'.  */#define TARGET_SHORT (target_flags & 040)/* Compile with special insns for Sun FPA.  */#ifdef SUPPORT_SUN_FPA#define TARGET_FPA (target_flags & 0100)#else#define TARGET_FPA 0#endif/* Compile (actually, link) for Sun SKY board.  */#define TARGET_SKY (target_flags & 0200)/* Optimize for 68040, but still allow execution on 68020   (-m68020-40 or -m68040).   The 68040 will execute all 68030 and 68881/2 instructions, but some   of them must be emulated in software by the OS.  When TARGET_68040 is   turned on, these instructions won't be used.  This code will still   run on a 68030 and 68881/2. */#define TARGET_68040 (target_flags & 01400)/* Use the 68040-only fp instructions (-m68040).  */#define TARGET_68040_ONLY (target_flags & 01000)/* Macro to define tables used to set the flags.   This is a list in braces of pairs in braces,   each pair being { "NAME", VALUE }   where VALUE is the bits to set or minus the bits to clear.   An empty string NAME is used to identify the default VALUE.  */#define TARGET_SWITCHES  \  { { "68020", -01400},				\    { "c68020", -01400},			\    { "68020", 5},				\    { "c68020", 5},				\    { "68881", 2},				\    { "bitfield", 4},				\    { "68000", -01405},				\    { "c68000", -01405},			\    { "soft-float", -01102},			\    { "nobitfield", -4},			\    { "rtd", 8},				\    { "nortd", -8},				\    { "short", 040},				\    { "noshort", -040},				\    { "fpa", 0100},				\    { "nofpa", -0100},				\    { "sky", 0200},				\    { "nosky", -0200},				\    { "68020-40", 0407},			\    { "68030", -01400},				\    { "68030", 5},				\    { "68040", 01007},				\    { "68851", 0},	/* Affects *_SPEC and/or GAS.  */	\    { "no-68851", 0},	/* Affects *_SPEC and/or GAS.  */	\    { "68302", 0},	/* Affects *_SPEC and/or GAS.  */	\    { "no-68302", 0},	/* Affects *_SPEC and/or GAS.  */	\    { "68332", 0},	/* Affects *_SPEC and/or GAS.  */	\    { "no-68332", 0},	/* Affects *_SPEC and/or GAS.  */	\    SUBTARGET_SWITCHES				\    { "", TARGET_DEFAULT}}/* TARGET_DEFAULT is defined in sun*.h and isi.h, etc.  *//* This is meant to be redefined in the host dependent files */#define SUBTARGET_SWITCHES#ifdef SUPPORT_SUN_FPA/* Blow away 68881 flag silently on TARGET_FPA (since we can't clear   any bits in TARGET_SWITCHES above) */#define OVERRIDE_OPTIONS		\{					\  if (TARGET_FPA) target_flags &= ~2;	\  if (! TARGET_68020 && flag_pic == 2)	\    error("-fPIC is not currently supported on the 68000 or 68010\n");	\  SUBTARGET_OVERRIDE_OPTIONS;		\}#else#define OVERRIDE_OPTIONS		\{					\  if (! TARGET_68020 && flag_pic == 2)	\    error("-fPIC is not currently supported on the 68000 or 68010\n");	\  SUBTARGET_OVERRIDE_OPTIONS;		\}#endif /* defined SUPPORT_SUN_FPA *//* This is meant to be redefined in the host dependent files */#define SUBTARGET_OVERRIDE_OPTIONS/* target machine storage layout *//* Define for XFmode extended real floating point support.   This will automatically cause REAL_ARITHMETIC to be defined.  */#define LONG_DOUBLE_TYPE_SIZE 96/* Define if you don't want extended real, but do want to use the   software floating point emulator for REAL_ARITHMETIC and   decimal <-> binary conversion. *//* #define REAL_ARITHMETIC *//* Define this if most significant bit is lowest numbered   in instructions that operate on numbered bit-fields.   This is true for 68020 insns such as bfins and bfexts.   We make it true always by avoiding using the single-bit insns   except in special cases with constant bit numbers.  */#define BITS_BIG_ENDIAN 1/* Define this if most significant byte of a word is the lowest numbered.  *//* That is true on the 68000.  */#define BYTES_BIG_ENDIAN 1/* Define this if most significant word of a multiword number is the lowest   numbered.  *//* For 68000 we can decide arbitrarily   since there are no machine instructions for them.   So let's be consistent.  */#define WORDS_BIG_ENDIAN 1/* number of bits in an addressable storage unit */#define BITS_PER_UNIT 8/* Width in bits of a "word", which is the contents of a machine register.   Note that this is not necessarily the width of data type `int';   if using 16-bit ints on a 68000, this would still be 32.   But on a machine with 16-bit registers, this would be 16.  */#define BITS_PER_WORD 32/* Width of a word, in units (bytes).  */#define UNITS_PER_WORD 4/* Width in bits of a pointer.   See also the macro `Pmode' defined below.  */#define POINTER_SIZE 32/* Allocation boundary (in *bits*) for storing arguments in argument list.  */#define PARM_BOUNDARY (TARGET_SHORT ? 16 : 32)/* Boundary (in *bits*) on which stack pointer should be aligned.  */#define STACK_BOUNDARY 16/* Allocation boundary (in *bits*) for the code of a function.  */#define FUNCTION_BOUNDARY 16/* Alignment of field after `int : 0' in a structure.  */#define EMPTY_FIELD_BOUNDARY 16/* No data type wants to be aligned rounder than this.  */#define BIGGEST_ALIGNMENT 16/* Set this nonzero if move instructions will actually fail to work   when given unaligned data.  */#define STRICT_ALIGNMENT 1#define SELECT_RTX_SECTION(MODE, X)					\{									\  if (!flag_pic)							\    readonly_data_section();						\  else if (LEGITIMATE_PIC_OPERAND_P (X))				\    readonly_data_section();						\  else									\    data_section();							\}/* Define number of bits in most basic integer type.   (If undefined, default is BITS_PER_WORD).  */#define INT_TYPE_SIZE (TARGET_SHORT ? 16 : 32)/* Define these to avoid dependence on meaning of `int'.   Note that WCHAR_TYPE_SIZE is used in cexp.y,   where TARGET_SHORT is not available.  */#define WCHAR_TYPE "long int"#define WCHAR_TYPE_SIZE 32/* Standard register usage.  *//* Number of actual hardware registers.   The hardware registers are assigned numbers for the compiler   from 0 to just below FIRST_PSEUDO_REGISTER.   All registers that the compiler knows about must be given numbers,   even those that are not normally considered general registers.   For the 68000, we give the data registers numbers 0-7,   the address registers numbers 010-017,   and the 68881 floating point registers numbers 020-027.  */#ifndef SUPPORT_SUN_FPA#define FIRST_PSEUDO_REGISTER 24#else#define FIRST_PSEUDO_REGISTER 56#endif/* This defines the register which is used to hold the offset table for PIC. */#define PIC_OFFSET_TABLE_REGNUM 13/* Used to output a (use pic_offset_table_rtx) so that we    always save/restore a5 in functions that use PIC relocation   at *any* time during the compilation process. */#define FINALIZE_PIC finalize_pic()#ifndef SUPPORT_SUN_FPA/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.   On the 68000, only the stack pointer is such.  */#define FIXED_REGISTERS        \ {/* Data registers.  */       \  0, 0, 0, 0, 0, 0, 0, 0,      \                               \  /* Address registers.  */    \  0, 0, 0, 0, 0, 0, 0, 1,      \                               \  /* Floating point registers  \     (if available).  */       \  0, 0, 0, 0, 0, 0, 0, 0 }/* 1 for registers not available across function calls.   These must include the FIXED_REGISTERS and also any   registers that can be used without being saved.   The latter must include the registers where values are returned   and the register where structure-value addresses are passed.   Aside from that, you can include as many other registers as you like.  */#define CALL_USED_REGISTERS \ {1, 1, 0, 0, 0, 0, 0, 0,   \  1, 1, 0, 0, 0, 0, 0, 1,   \  1, 1, 0, 0, 0, 0, 0, 0 }#else /* SUPPORT_SUN_FPA *//* 1 for registers that have pervasive standard uses   and are not available for the register allocator.   On the 68000, only the stack pointer is such.  *//* fpa0 is also reserved so that it can be used to move shit back and   forth between high fpa regs and everything else. */#define FIXED_REGISTERS        \ {/* Data registers.  */       \  0, 0, 0, 0, 0, 0, 0, 0,      \                               \  /* Address registers.  */    \  0, 0, 0, 0, 0, 0, 0, 1,      \                               \  /* Floating point registers  \     (if available).  */       \  0, 0, 0, 0, 0, 0, 0, 0,      \                               \  /* Sun3 FPA registers.  */   \  1, 0, 0, 0, 0, 0, 0, 0,      \  0, 0, 0, 0, 0, 0, 0, 0,      \  0, 0, 0, 0, 0, 0, 0, 0,      \  0, 0, 0, 0, 0, 0, 0, 0 }/* 1 for registers not available across function calls.   These must include the FIXED_REGISTERS and also any   registers that can be used without being saved.   The latter must include the registers where values are returned   and the register where structure-value addresses are passed.   Aside from that, you can include as many other registers as you like.  */#define CALL_USED_REGISTERS \ {1, 1, 0, 0, 0, 0, 0, 0, \  1, 1, 0, 0, 0, 0, 0, 1, \  1, 1, 0, 0, 0, 0, 0, 0, \  /* FPA registers.  */   \  1, 1, 1, 1, 0, 0, 0, 0, \  0, 0, 0, 0, 0, 0, 0, 0, \  0, 0, 0, 0, 0, 0, 0, 0, \  0, 0, 0, 0, 0, 0, 0, 0  }#endif /* defined SUPPORT_SUN_FPA *//* Make sure everything's fine if we *don't* have a given processor.   This assumes that putting a register in fixed_regs will keep the   compiler's mitts completely off it.  We don't bother to zero it out   of register classes.  If neither TARGET_FPA or TARGET_68881 is set,   the compiler won't touch since no instructions that use these   registers will be valid.  */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -