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

📄 mn10300.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 3 页
字号:
/* Definitions of target machine for GNU compiler. Matsushita MN10300 series   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.   Contributed by Jeff Law (law@cygnus.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 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.  */#include "svr4.h"#undef ASM_SPEC#undef ASM_FINAL_SPEC#undef LIB_SPEC#undef ENDFILE_SPEC#undef LINK_SPEC#undef STARTFILE_SPEC/* Names to predefine in the preprocessor for this target machine.  */#define CPP_PREDEFINES "-D__mn10300__ -D__MN10300__"/* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;/* Macros used in the machine description to test the 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.  *//* Generate code to work around mul/mulq bugs on the mn10300.  */#define TARGET_MULT_BUG			(target_flags & 0x1)#define TARGET_SWITCHES  \  {{ "mult-bug",	0x1,  "Work around hardware multiply bug"},	\   { "no-mult-bug", 	-0x1, "Do not work around hardware multiply bug"},\   { "", TARGET_DEFAULT, NULL}}#ifndef TARGET_DEFAULT#define TARGET_DEFAULT 0x1#endif/* Print subsidiary information on the compiler version in use.  */#define TARGET_VERSION fprintf (stderr, " (MN10300)");/* Target machine storage layout *//* Define this if most significant bit is lowest numbered   in instructions that operate on numbered bit-fields.   This is not true on the Matsushita MN1003.  */#define BITS_BIG_ENDIAN 0/* Define this if most significant byte of a word is the lowest numbered.  *//* This is not true on the Matsushita MN10300.  */#define BYTES_BIG_ENDIAN 0/* Define this if most significant word of a multiword number is lowest   numbered.   This is not true on the Matsushita MN10300.  */#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/* The stack goes in 32 bit lumps.  */#define STACK_BOUNDARY 		32/* Allocation boundary (in *bits*) for the code of a function.   8 is the minimum boundary; it's unclear if bigger alignments   would improve performance.  */#define FUNCTION_BOUNDARY 8/* No data type wants to be aligned rounder than this.   */#define BIGGEST_ALIGNMENT	32/* Alignment of field after `int : 0' in a structure.  */#define EMPTY_FIELD_BOUNDARY 32/* Define this if move instructions will actually fail to work   when given unaligned data.  */#define STRICT_ALIGNMENT 1/* Define this as 1 if `char' should by default be signed; else as 0.  */#define DEFAULT_SIGNED_CHAR 0/* Define results of standard character escape sequences.  */#define TARGET_BELL 007#define TARGET_BS 010#define TARGET_TAB 011#define TARGET_NEWLINE 012#define TARGET_VT 013#define TARGET_FF 014#define TARGET_CR 015/* 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.  */#define FIRST_PSEUDO_REGISTER 10/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.  */#define FIXED_REGISTERS \  { 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 0, 0, 1, 1, 0, 0, 1, 1}#define REG_ALLOC_ORDER \  { 0, 1, 4, 5, 2, 3, 6, 7, 8, 9}/* 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.  */#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.  */#define HARD_REGNO_MODE_OK(REGNO, MODE) \ (REGNO_REG_CLASS (REGNO) == DATA_REGS 			\  ? ((REGNO) & 1) == 0 || GET_MODE_SIZE (MODE) <= 4	\  : ((REGNO) & 1) == 0 || GET_MODE_SIZE (MODE) == 4)/* 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 == MODE2 || (GET_MODE_SIZE (MODE1) <= 4 && GET_MODE_SIZE (MODE2) <= 4))/* 4 data, and effectively 3 address registers is small as far as I'm   concerned.  */#define SMALL_REGISTER_CLASSES 1/* 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.  */   enum reg_class {  NO_REGS, DATA_REGS, ADDRESS_REGS, SP_REGS,  DATA_OR_ADDRESS_REGS, SP_OR_ADDRESS_REGS,   GENERAL_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", "DATA_REGS", "ADDRESS_REGS", \  "SP_REGS", "DATA_OR_ADDRESS_REGS", "SP_OR_ADDRESS_REGS", \  "GENERAL_REGS", "ALL_REGS", "LIM_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,		/* No regs      */	\   0x00f,		/* DATA_REGS */		\   0x1f0,		/* ADDRESS_REGS */	\   0x200,		/* SP_REGS */		\   0x1ff,		/* DATA_OR_ADDRESS_REGS */\   0x1f0,		/* SP_OR_ADDRESS_REGS */\   0x1ff,		/* GENERAL_REGS */    	\   0x3ff,		/* ALL_REGS 	*/	\}/* 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) < 4 ? DATA_REGS : \   (REGNO) < 9 ? ADDRESS_REGS : \    (REGNO) == 9 ? SP_REGS : 0)/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS DATA_REGS#define BASE_REG_CLASS  SP_OR_ADDRESS_REGS/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C) \  ((C) == 'd' ? DATA_REGS : \   (C) == 'a' ? ADDRESS_REGS : \   (C) == 'y' ? SP_REGS : NO_REGS)/* Macros to check register numbers against specific register classes.  *//* These assume that REGNO is a hard or pseudo reg number.   They give nonzero only if REGNO is a hard reg of the suitable class   or a pseudo reg currently allocated to a suitable hard reg.   Since they use reg_renumber, they are safe only once reg_renumber   has been allocated, which happens in local-alloc.c.  */ #define REGNO_OK_FOR_BASE_P(regno) \  (((regno) > 3 && regno < FIRST_PSEUDO_REGISTER)	\   || (reg_renumber[regno] > 3 && reg_renumber[regno] < FIRST_PSEUDO_REGISTER))#define REGNO_OK_FOR_BIT_BASE_P(regno) \  (((regno) > 3 && regno < 10)	\   || (reg_renumber[regno] > 3 && reg_renumber[regno] < 10))#define REGNO_OK_FOR_INDEX_P(regno) \  (((regno) >= 0 && regno < 4)	\   || (reg_renumber[regno] >= 0 && reg_renumber[regno] < 4))/* 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) \  (X == stack_pointer_rtx && CLASS != SP_REGS ? ADDRESS_REGS : CLASS)#define PREFERRED_OUTPUT_RELOAD_CLASS(X,CLASS) \  (X == stack_pointer_rtx && CLASS != SP_REGS ? ADDRESS_REGS : CLASS)#define LIMIT_RELOAD_CLASS(MODE, CLASS) \  ((MODE == QImode || MODE == HImode) ? DATA_REGS : CLASS)#define SECONDARY_RELOAD_CLASS(CLASS,MODE,IN) \  secondary_reload_class(CLASS,MODE,IN)/* 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)/* The letters I, J, K, L, M, N, O, P 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.  */#define INT_8_BITS(VALUE) ((unsigned) (VALUE) + 0x80 < 0x100)#define INT_16_BITS(VALUE) ((unsigned) (VALUE) + 0x8000 < 0x10000)#define CONST_OK_FOR_I(VALUE) ((VALUE) == 0)#define CONST_OK_FOR_J(VALUE) ((VALUE) == 1)#define CONST_OK_FOR_K(VALUE) ((VALUE) == 2)#define CONST_OK_FOR_L(VALUE) ((VALUE) == 4)#define CONST_OK_FOR_M(VALUE) ((VALUE) == 3)#define CONST_OK_FOR_N(VALUE) ((VALUE) == 255 || (VALUE) == 65535)#define CONST_OK_FOR_LETTER_P(VALUE, C) \  ((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \   (C) == 'J' ? CONST_OK_FOR_J (VALUE) : \   (C) == 'K' ? CONST_OK_FOR_K (VALUE) : \   (C) == 'L' ? CONST_OK_FOR_L (VALUE) : \   (C) == 'M' ? CONST_OK_FOR_M (VALUE) : \   (C) == 'N' ? CONST_OK_FOR_N (VALUE) : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.        `G' is a floating-point zero.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \  ((C) == 'G' ? (GET_MODE_CLASS (GET_MODE (VALUE)) == MODE_FLOAT	\		 && (VALUE) == CONST0_RTX (GET_MODE (VALUE))) : 0)/* 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.  */#define FRAME_GROWS_DOWNWARD

⌨️ 快捷键说明

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