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

📄 tm-m88k.h

📁 这是完整的gcc源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
/* Definitions of target machine for GNU compiler, for the Motorola 88000 chip.   Copyright (C) 1988 Free Software Foundation, Inc.   Contributed by Michael Tiemann (tiemann@mcc.com)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, 675 Mass Ave, Cambridge, MA 02139, USA.  *//* Note that some other tm- 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 "-Dm88000 -Dm88k"/* Print subsidiary information on the compiler version in use.  */#define TARGET_VERSION fprintf (stderr, " (88k)");/* Run-time compilation parameters selecting different hardware subsets.   On the the m88000, we don't yet need any.  */extern int target_flags;/* 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  \  {{ "", TARGET_DEFAULT}}#define TARGET_DEFAULT 1/* target machine storage layout *//* Define this if most significant bit is lowest numbered   in instructions that operate on numbered bit-fields.  */#define BITS_BIG_ENDIAN/* Define this if most significant byte of a word is the lowest numbered.  *//* That is true on the m88000.  */#define BYTES_BIG_ENDIAN/* Define this if most significant word of a multiword number is numbered.  *//* For the m88000 we can decide arbitrarily   since there are no machine instructions for them.  *//* #define WORDS_BIG_ENDIAN *//* number of bits in an addressible 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 pointers in memory.  */#define POINTER_BOUNDARY 32/* Allocation boundary (in *bits*) for storing arguments in argument list.  */#define PARM_BOUNDARY 32/* Allocation boundary (in *bits*) for the code of a function.  */#define FUNCTION_BOUNDARY 32/* Alignment of field after `int : 0' in a structure.  */#define EMPTY_FIELD_BOUNDARY 32/* No data type wants to be aligned rounder than this.  */#define BIGGEST_ALIGNMENT 64/* Define this if move instructions will actually fail to work   when given unaligned data.  */#define STRICT_ALIGNMENT/* 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.   the m88000 has 32 fullword registers.  */#define FIRST_PSEUDO_REGISTER 32/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.   On the 88000, these are:   Reg 0	= 0 (hardware).   Reg 1	= Subroutine return pointer (hardware).   [Reg 2-9	= Parameter registers (Motorola convention).]   Reg 25	= condition code register (Gnu).   Reg 26-29	= reserved by Motorola.   Reg 30 = frame pointer (software).   Reg 31 = stack pointer (software).  */#define FIXED_REGISTERS  \ {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, 1, 1, 1, 1, 1, 0, 1}/* 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, 1, 1, 1, 1, 1, 1, \  1, 1, 1, 1, 1, 1, 0, 0, \  0, 0, 0, 0, 0, 0, 0, 0, \  0, 1, 1, 1, 1, 1, 0, 1}/* 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 m88000, ordinary registers hold 32 bits worth;   a single floating point register is always enough for   anything that can be stored in them at all.  */#define HARD_REGNO_NREGS(REGNO, MODE)   \  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.   On the m88000, the cpu registers can hold any mode, but doubles   (and larger) must start and an even register number boundary.  */#define HARD_REGNO_MODE_OK(REGNO, MODE) \  (GET_MODE_SIZE (MODE) <= 4 || ((REGNO) & 1) == 0)/* 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.  */#define MODES_TIEABLE_P(MODE1, MODE2) \  (((MODE1) == DFmode || (MODE1) == DImode) \   == ((MODE2) == DFmode || (MODE2) == DImode))/* Specify the registers used for certain standard purposes.   The values of these macros are register numbers.  *//* the m88000 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 31/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM 30/* 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 0/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM 30/* Register in which static-chain is passed to a function.  *//* ??? */#define STATIC_CHAIN_REGNUM 10/* Register in which address to store a structure value   is passed to a function.  */#define STRUCT_VALUE_REGNUM 2#define STRUCT_VALUE_STACK_PROTECT_REGNUM 3/* 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 88000 has one kind of registers, hence two classes.  */enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };#define N_REG_CLASSES (int) LIM_REG_CLASSES/* Since GENERAL_REGS is the same class as ALL_REGS,   don't give it a different class number; just make it an alias.  */#define GENERAL_REGS ALL_REGS/* Give names of register classes as strings for dump file.   */#define REG_CLASS_NAMES {"NO_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, -1}/* 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) ALL_REGS/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS ALL_REGS#define BASE_REG_CLASS ALL_REGS/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C) 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 m88000, `I' is used for the range of constants an insn   can actually contain.   `J' is used for the range which is just zero (since that is R0).   `K' is used for the 5-bit operand of a compare insns.  */#define CONST_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'I' ? (unsigned) (VALUE) < 0x10000		\   : (C) == 'J' ? (VALUE) == 0				\   : (C) == 'K' ? (unsigned) (VALUE) < 0x20		\   : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'G' && XINT (VALUE, 0) == 0 && XINT (VALUE, 1) == 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.  */#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.  */#define CLASS_MAX_NREGS(CLASS, MODE)	\  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* Stack layout; function entry, exit and calling.  *//* Define this if pushing a word on the stack   makes the stack pointer a smaller address.  */#define STACK_GROWS_DOWNWARD/* Define this if the nominal address of the stack frame   is at the high-address end of the local variables;   that is, each additional local variable allocated   goes at a more negative offset in the frame.   Do not define this for the Motorola 88000.  There are no   negative literals!  *//* #define FRAME_GROWS_DOWNWARD *//* Offset within stack frame to start allocating local variables at.   If FRAME_GROWS_DOWNWARD, this is the offset to the END of the   first local allocated.  Otherwise, it is the offset to the BEGINNING   of the first local allocated.  */#define STARTING_FRAME_OFFSET 0/* If we generate an insn to push BYTES bytes,   this says how many the stack pointer really advances by.   On the m88000, don't define this because there are no push insns.  *//*  #define PUSH_ROUNDING(BYTES) *//* If BYTES is the size of arguments for a function call,   return the size of the argument block (which is BYTES suitably rounded).   Define this only on machines where the entire call block is allocated   before the args are stored into it.  */   #define ROUND_CALL_BLOCK_SIZE(BYTES)  \   (((BYTES) + 7) & ~7)/* Offset of first parameter from the argument pointer register value.  *//* For the 88000, this must be non-zero so that addresses of the parms   can always be distinguished.  */#define FIRST_PARM_OFFSET(FNDECL) 0/* Value is 1 if returning from a function call automatically   pops the arguments described by the number-of-args field in the call.   FUNTYPE is the data type of the function (as a tree),   or for a library call it is an identifier node for the subroutine name.  */#define RETURN_POPS_ARGS(FUNTYPE) 0/* Define how to find the value returned by a function.   VALTYPE is the data type of the value (as a tree).   If the precise function being called is known, FUNC is its FUNCTION_DECL;   otherwise, FUNC is 0.  *//* ?? On the m88000 the value is found in the second "output" register.  */#define FUNCTION_VALUE(VALTYPE, FUNC)  \  gen_rtx (REG, TYPE_MODE (VALTYPE), 2)/* ?? But the called function leaves it in the second "input" register.  */#define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC)  \  gen_rtx (REG, TYPE_MODE (VALTYPE), 2)/* Define how to find the value returned by a library function   assuming the value has mode MODE.  */#define LIBCALL_VALUE(MODE)  gen_rtx (REG, MODE, 2)/* 1 if N is a possible register number for a function value   as seen by the caller.   On the m88000, the first "output" reg is the only register thus used.  */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 2)/* 1 if N is a possible register number for function argument passing.   On the m88000, these are the "output" registers.  */#define FUNCTION_ARG_REGNO_P(N) ((N) <= 9 && (N) >= 2)/* Define a data type for recording info about an argument list   during the scan of that argument list.  This data type should   hold all necessary information about the function itself   and about the args processed so far, enough to enable macros   such as FUNCTION_ARG to determine where the next arg should go.   On the m88000, this is a single integer, which is a number of words   of arguments scanned so far (including the invisible argument,   if any, which holds the structure-value-address).   Thus 8 or more means all following args should go on the stack.  */#define CUMULATIVE_ARGS int/* Initialize a variable CUM of type CUMULATIVE_ARGS   for a call to a function whose data type is FNTYPE.

⌨️ 快捷键说明

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