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

📄 i860.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 4 页
字号:
/* Definitions of target machine for GNU compiler, for Intel 860.   Copyright (C) 1989, 91, 93, 95, 96, 1997 Free Software Foundation, Inc.   Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to   the whims of the System V Release 4 assembler.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.  */#define CPP_PREDEFINES "-Di860 -Dunix -Asystem(unix) -Asystem(svr4) -Acpu(i860) -Amachine(i860)"/* Print subsidiary information on the compiler version in use.  */#define TARGET_VERSION fprintf (stderr, " (i860)");/* Run-time compilation parameters selecting different hardware subsets   or supersets.   On the i860, we have one: TARGET_XP.  This option allows gcc to generate   additional instructions available only on the newer i860 XP (but not on   the older i860 XR).*/extern int target_flags;/* Nonzero if we should generate code to use the fpu.  */#define TARGET_XP (target_flags & 1)/* 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  \  { {"xp", 1, "Generate code which uses the FPU"},			\    {"noxp", -1, "Do not generate code which uses the FPU"},		\    {"xr", -1, "Do not generate code which uses the FPU"},		\    { "", TARGET_DEFAULT, NULL}}#define TARGET_DEFAULT 0/* target machine storage layout *//* Define this if most significant bit is lowest numbered   in instructions that operate on numbered bit-fields.   This is a moot question on the i860 due to the lack of bit-field insns.  */#define BITS_BIG_ENDIAN 0/* Define this if most significant byte of a word is the lowest numbered.  *//* That is not true on i860 in the mode we will use.  */#define BYTES_BIG_ENDIAN 0/* Define this if most significant word of a multiword number is the lowest   numbered.  *//* For the i860 this goes with BYTES_BIG_ENDIAN.  *//* NOTE: GCC probably cannot support a big-endian i860   because GCC fundamentally assumes that the order of words   in memory as the same as the order in registers.   That's not true for the big-endian i860.   The big-endian i860 isn't important enough to   justify the trouble of changing this assumption.  */#define WORDS_BIG_ENDIAN 0/* 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 32/* Boundary (in *bits*) on which stack pointer should be aligned.  */#define STACK_BOUNDARY 128/* Allocation boundary (in *bits*) for the code of a function.  */#define FUNCTION_BOUNDARY 64/* Alignment of field after `int : 0' in a structure.  */#define EMPTY_FIELD_BOUNDARY 32/* Every structure's size must be a multiple of this.  */#define STRUCTURE_SIZE_BOUNDARY 8/* Minimum size in bits of the largest boundary to which any   and all fundamental data types supported by the hardware   might need to be aligned. No data type wants to be aligned   rounder than this.  The i860 supports 128-bit (long double)   floating point quantities, and the System V Release 4 i860   ABI requires these to be aligned to 16-byte (128-bit)   boundaries.  */#define BIGGEST_ALIGNMENT 128/* Set this nonzero if move instructions will actually fail to work   when given unaligned data.  */#define STRICT_ALIGNMENT 1/* If bit field type is int, dont let it cross an int,   and give entire struct the alignment of an int.  */#define PCC_BITFIELD_TYPE_MATTERS 1/* 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.   i860 has 32 fullword registers and 32 floating point registers.  */#define FIRST_PSEUDO_REGISTER 64/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.   On the i860, this includes the always-0 registers   and fp, sp, arg pointer, and the return address.   Also r31, used for special purposes for constant addresses.  */#define FIXED_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, 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, 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.   On the i860, these are r0-r3, r16-r31, f0, f1, and f16-f31.  */#define CALL_USED_REGISTERS  \ {1, 1, 1, 1, 0, 0, 0, 0,	\  0, 0, 0, 0, 0, 0, 0, 0,	\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 0, 0, 0, 0, 0, 0,	\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 1, 1, 1}/* Try to get a non-preserved register before trying to get one we will   have to preserve.  Try to get an FP register only *after* trying to   get a general register, because it is relatively expensive to move   into or out of an FP register.  */#define REG_ALLOC_ORDER			\ {31, 30, 29, 28, 27, 26, 25, 24,	\  23, 22, 21, 20, 19, 18, 17, 16,	\  15, 14, 13, 12, 11, 10,  9,  8,	\   7,  6,  5,  4,  3,  2,  1,  0,	\  63, 62, 61, 60, 59, 58, 57, 56,	\  55, 54, 53, 52, 51, 50, 49, 48,	\  47, 46, 45, 44, 43, 42, 41, 40,	\  39, 38, 37, 36, 35, 34, 33, 32}/* Return number of consecutive hard regs needed starting at reg REGNO   to hold something of mode MODE.   This is ordinarily the length in words of a value of mode MODE   but can be less for certain modes in special long registers.   On the i860, all registers hold 32 bits worth.  */#define HARD_REGNO_NREGS(REGNO, MODE)   \  (((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))#define REGNO_MODE_ALIGNED(REGNO, MODE) \  (((REGNO) % ((GET_MODE_UNIT_SIZE (MODE) + 3) / 4)) == 0)/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.   On the i860, we allow anything to go into any registers, but we require   any sort of value going into the FP registers to be properly aligned   (based on its size) within the FP register set.*/#define HARD_REGNO_MODE_OK(REGNO, MODE)					\  (((REGNO) < 32) 							\   || (MODE) == VOIDmode || (MODE) == BLKmode				\   || REGNO_MODE_ALIGNED (REGNO, MODE))/* Value is 1 if it is a good idea to tie two pseudo registers   when one has mode MODE1 and one has mode MODE2.   If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,   for any hard reg, then this must be 0 for correct output.  *//* I think that is not always true; alignment restrictions for doubles   should not prevent tying them with singles.  So try allowing that.   On the other hand, don't let fixed and floating be tied;   this restriction is not necessary, but may make better code.  */#define MODES_TIEABLE_P(MODE1, MODE2) \  ((GET_MODE_CLASS (MODE1) == MODE_FLOAT		\    || GET_MODE_CLASS (MODE1) == MODE_COMPLEX_FLOAT)	\   == (GET_MODE_CLASS (MODE2) == MODE_FLOAT		\       || GET_MODE_CLASS (MODE2) == MODE_COMPLEX_FLOAT))/* Specify the registers used for certain standard purposes.   The values of these macros are register numbers.  *//* i860 pc isn't overloaded on a register that the compiler knows about.  *//* #define PC_REGNUM  *//* Register to use for pushing function arguments.  */#define STACK_POINTER_REGNUM 2/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM 3/* Value should be nonzero if functions must have frame pointers.   Zero means the frame pointer need not be set up (and parms   may be accessed via the stack pointer) in functions that seem suitable.   This is computed in `reload', in reload1.c.  */#define FRAME_POINTER_REQUIRED 1/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM 28/* Register in which static-chain is passed to a function.  */#define STATIC_CHAIN_REGNUM 29/* Register in which address to store a structure value   is passed to a function.  */#define STRUCT_VALUE_REGNUM 16/* Register to use when a source of a floating-point zero is needed.  */#define F0_REGNUM	32/* Define the classes of registers for register constraints in the   machine description.  Also define ranges of constants.   One of the classes must always be named ALL_REGS and include all hard regs.   If there is more than one class, another class must be named NO_REGS   and contain no registers.   The name GENERAL_REGS must be the name of a class (or an alias for   another name such as ALL_REGS).  This is the class of registers   that is allowed by "g" or "r" in a register constraint.   Also, registers outside this class are allocated only when   instructions express preferences for them.   The classes must be numbered in nondecreasing order; that is,   a larger-numbered class must never be contained completely   in a smaller-numbered class.   For any two classes, it is very desirable that there be another   class that represents their union.  */   /* The i860 has two kinds of registers, hence four classes.  */enum reg_class { NO_REGS, GENERAL_REGS, FP_REGS, ALL_REGS, LIM_REG_CLASSES };#define N_REG_CLASSES (int) LIM_REG_CLASSES/* Give names of register classes as strings for dump file.   */#define REG_CLASS_NAMES \ {"NO_REGS", "GENERAL_REGS", "FP_REGS", "ALL_REGS" }/* Define which registers fit in which classes.   This is an initializer for a vector of HARD_REG_SET   of length N_REG_CLASSES.  */#define REG_CLASS_CONTENTS	\ {{0, 0}, {0xffffffff, 0},	\  {0, 0xffffffff}, {0xffffffff, 0xffffffff}}/* The same information, inverted:   Return the class number of the smallest class containing   reg number REGNO.  This could be a conditional expression   or could index an array.  */#define REGNO_REG_CLASS(REGNO) \ ((REGNO) >= 32 ? FP_REGS : GENERAL_REGS)/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS GENERAL_REGS#define BASE_REG_CLASS GENERAL_REGS/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C) \  ((C) == 'f' ? FP_REGS : NO_REGS)/* The letters I, J, K, L and M in a register constraint string   can be used to stand for particular ranges of immediate operands.   This macro defines what the ranges are.   C is the letter, and VALUE is a constant value.   Return 1 if VALUE is in the range specified by C.   For the i860, `I' is used for the range of constants    an add/subtract insn can actually contain.   But not including -0x8000, since we need   to negate the constant sometimes.   `J' is used for the range which is just zero (since that is R0).   `K' is used for the range allowed in bte.   `L' is used for the range allowed in logical insns.  */#define SMALL_INT(X) ((unsigned) (INTVAL (X) + 0x7fff) < 0xffff)#define LOGIC_INT(X) ((unsigned) INTVAL (X) < 0x10000)#define SMALL_INTVAL(X) ((unsigned) ((X) + 0x7fff) < 0xffff)#define LOGIC_INTVAL(X) ((unsigned) (X) < 0x10000)#define CONST_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'I' ? ((unsigned) (VALUE) + 0x7fff) < 0xffff	\   : (C) == 'J' ? (VALUE) == 0				\   : (C) == 'K' ? (unsigned) (VALUE) < 0x20	\   : (C) == 'L' ? (unsigned) (VALUE) < 0x10000	\   : 0)/* Return non-zero if the given VALUE is acceptable for the   constraint letter C.  For the i860, constraint letter 'G'   permits only a floating-point zero value.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  	\  ((C) == 'G' && CONST_DOUBLE_LOW ((VALUE)) == 0	\   && CONST_DOUBLE_HIGH ((VALUE)) == 0)/* Given an rtx X being reloaded into a reg required to be   in class CLASS, return the class of reg to actually use.   In general this is just CLASS; but on some machines   in some cases it is preferable to use a more restrictive class.   If we are trying to put an integer constant into some register, prefer an   integer register to an FP register.  If we are trying to put a    non-zero floating-point constant into some register, use an integer   register if the constant is SFmode and GENERAL_REGS is one of our options.   Otherwise, put the constant into memory.   When reloading something smaller than a word, use a general reg

⌨️ 快捷键说明

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