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

📄 frv.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Small Data Area Support.  *//* Maximum size of variables that go in .sdata/.sbss.   The -msdata=foo switch also controls how small variables are handled.  */#ifndef SDATA_DEFAULT_SIZE#define SDATA_DEFAULT_SIZE 8#endif/* Storage Layout *//* Define this macro to have the value 1 if the most significant bit in a byte   has the lowest number; otherwise define it to have the value zero.  This   means that bit-field instructions count from the most significant bit.  If   the machine has no bit-field instructions, then this must still be defined,   but it doesn't matter which value it is defined to.  This macro need not be   a constant.   This macro does not affect the way structure fields are packed into bytes or   words; that is controlled by `BYTES_BIG_ENDIAN'.  */#define BITS_BIG_ENDIAN 1/* Define this macro to have the value 1 if the most significant byte in a word   has the lowest number.  This macro need not be a constant.  */#define BYTES_BIG_ENDIAN 1/* Define this macro to have the value 1 if, in a multiword object, the most   significant word has the lowest number.  This applies to both memory   locations and registers; GCC fundamentally assumes that the order of   words in memory is the same as the order in registers.  This macro need not   be a constant.  */#define WORDS_BIG_ENDIAN 1/* Number of storage units in a word; normally 4.  */#define UNITS_PER_WORD 4/* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and   which has the specified mode and signedness is to be stored in a register.   This macro is only called when TYPE is a scalar type.   On most RISC machines, which only have operations that operate on a full   register, define this macro to set M to `word_mode' if M is an integer mode   narrower than `BITS_PER_WORD'.  In most cases, only integer modes should be   widened because wider-precision floating-point operations are usually more   expensive than their narrower counterparts.   For most machines, the macro definition does not change UNSIGNEDP.  However,   some machines, have instructions that preferentially handle either signed or   unsigned quantities of certain modes.  For example, on the DEC Alpha, 32-bit   loads from memory and 32-bit add instructions sign-extend the result to 64   bits.  On such machines, set UNSIGNEDP according to which kind of extension   is more efficient.   Do not define this macro if it would never modify MODE.  */#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE)	\  do						\    {						\      if (GET_MODE_CLASS (MODE) == MODE_INT	\	  && GET_MODE_SIZE (MODE) < 4)		\	(MODE) = SImode;			\    }						\  while (0)/* Normal alignment required for function parameters on the stack, in bits.   All stack parameters receive at least this much alignment regardless of data   type.  On most machines, this is the same as the size of an integer.  */#define PARM_BOUNDARY 32/* Define this macro if you wish to preserve a certain alignment for the stack   pointer.  The definition is a C expression for the desired alignment   (measured in bits).   If `PUSH_ROUNDING' is not defined, the stack will always be aligned to the   specified boundary.  If `PUSH_ROUNDING' is defined and specifies a less   strict alignment than `STACK_BOUNDARY', the stack may be momentarily   unaligned while pushing arguments.  */#define STACK_BOUNDARY 64/* Alignment required for a function entry point, in bits.  */#define FUNCTION_BOUNDARY 128/* Biggest alignment that any data type can require on this machine,   in bits.  */#define BIGGEST_ALIGNMENT 64/* @@@ A hack, needed because libobjc wants to use ADJUST_FIELD_ALIGN for   some reason.  */#ifdef IN_TARGET_LIBS#define BIGGEST_FIELD_ALIGNMENT 64#else/* An expression for the alignment of a structure field FIELD if the   alignment computed in the usual way is COMPUTED.  GCC uses this   value instead of the value in `BIGGEST_ALIGNMENT' or   `BIGGEST_FIELD_ALIGNMENT', if defined, for structure fields only.  */#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) 				\  frv_adjust_field_align (FIELD, COMPUTED)#endif/* If defined, a C expression to compute the alignment for a static variable.   TYPE is the data type, and ALIGN is the alignment that the object   would ordinarily have.  The value of this macro is used instead of that   alignment to align the object.   If this macro is not defined, then ALIGN is used.   One use of this macro is to increase alignment of medium-size data to make   it all fit in fewer cache lines.  Another is to cause character arrays to be   word-aligned so that `strcpy' calls that copy constants to character arrays   can be done inline.  */#define DATA_ALIGNMENT(TYPE, ALIGN)		\  (TREE_CODE (TYPE) == ARRAY_TYPE		\   && TYPE_MODE (TREE_TYPE (TYPE)) == QImode	\   && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))/* If defined, a C expression to compute the alignment given to a constant that   is being placed in memory.  CONSTANT is the constant and ALIGN is the   alignment that the object would ordinarily have.  The value of this macro is   used instead of that alignment to align the object.   If this macro is not defined, then ALIGN is used.   The typical use of this macro is to increase alignment for string constants   to be word aligned so that `strcpy' calls that copy constants can be done   inline.  */#define CONSTANT_ALIGNMENT(EXP, ALIGN)  \  (TREE_CODE (EXP) == STRING_CST	\   && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))/* Define this macro to be the value 1 if instructions will fail to work if   given data not on the nominal alignment.  If instructions will merely go   slower in that case, define this macro as 0.  */#define STRICT_ALIGNMENT 1/* Define this if you wish to imitate the way many other C compilers handle   alignment of bitfields and the structures that contain them.   The behavior is that the type written for a bit-field (`int', `short', or   other integer type) imposes an alignment for the entire structure, as if the   structure really did contain an ordinary field of that type.  In addition,   the bit-field is placed within the structure so that it would fit within such   a field, not crossing a boundary for it.   Thus, on most machines, a bit-field whose type is written as `int' would not   cross a four-byte boundary, and would force four-byte alignment for the   whole structure.  (The alignment used may not be four bytes; it is   controlled by the other alignment parameters.)   If the macro is defined, its definition should be a C expression; a nonzero   value for the expression enables this behavior.   Note that if this macro is not defined, or its value is zero, some bitfields   may cross more than one alignment boundary.  The compiler can support such   references if there are `insv', `extv', and `extzv' insns that can directly   reference memory.   The other known way of making bitfields work is to define   `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'.  Then every   structure can be accessed with fullwords.   Unless the machine has bit-field instructions or you define   `STRUCTURE_SIZE_BOUNDARY' that way, you must define   `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value.   If your aim is to make GCC use the same conventions for laying out   bitfields as are used by another compiler, here is how to investigate what   the other compiler does.  Compile and run this program:        struct foo1        {          char x;          char :0;          char y;        };        struct foo2        {          char x;          int :0;          char y;        };        main ()        {          printf ("Size of foo1 is %d\n",                  sizeof (struct foo1));          printf ("Size of foo2 is %d\n",                  sizeof (struct foo2));          exit (0);        }   If this prints 2 and 5, then the compiler's behavior is what you would get   from `PCC_BITFIELD_TYPE_MATTERS'.   Defined in svr4.h.  */#define PCC_BITFIELD_TYPE_MATTERS 1/* Layout of Source Language Data Types.  */#define CHAR_TYPE_SIZE         8#define SHORT_TYPE_SIZE       16#define INT_TYPE_SIZE         32#define LONG_TYPE_SIZE        32#define LONG_LONG_TYPE_SIZE   64#define FLOAT_TYPE_SIZE       32#define DOUBLE_TYPE_SIZE      64#define LONG_DOUBLE_TYPE_SIZE 64/* An expression whose value is 1 or 0, according to whether the type `char'   should be signed or unsigned by default.  The user can always override this   default with the options `-fsigned-char' and `-funsigned-char'.  */#define DEFAULT_SIGNED_CHAR 1/* General purpose registers.  */#define GPR_FIRST       0                       /* First gpr */#define GPR_LAST        (GPR_FIRST + 63)        /* Last gpr */#define GPR_R0          GPR_FIRST               /* R0, constant 0 */#define GPR_FP          (GPR_FIRST + 2)         /* Frame pointer */#define GPR_SP          (GPR_FIRST + 1)         /* Stack pointer */						/* small data register */#define SDA_BASE_REG    ((unsigned)(TARGET_FDPIC ? -1 : flag_pic ? PIC_REGNO : (GPR_FIRST + 16)))#define PIC_REGNO       (GPR_FIRST + (TARGET_FDPIC?15:17))        /* PIC register.  */#define FDPIC_FPTR_REGNO  (GPR_FIRST + 14)        /* uClinux PIC function pointer register.  */#define FDPIC_REGNO   (GPR_FIRST + 15)        /* uClinux PIC register.  */#define OUR_FDPIC_REG	get_hard_reg_initial_val (SImode, FDPIC_REGNO)#define FPR_FIRST       64			/* First FP reg */#define FPR_LAST        127			/* Last  FP reg */#define DEFAULT_CONDEXEC_TEMPS 4		/* reserve 4 regs by default */#define GPR_TEMP_NUM	frv_condexec_temps	/* # gprs to reserve for temps *//* We reserve the last CR and CCR in each category to be used as a reload   register to reload the CR/CCR registers.  This is a kludge.  */#define CC_FIRST	128			/* First ICC/FCC reg */#define CC_LAST		135			/* Last  ICC/FCC reg */#define ICC_FIRST	(CC_FIRST + 4)		/* First ICC reg */#define ICC_LAST	(CC_FIRST + 7)		/* Last  ICC reg */#define ICC_TEMP	(CC_FIRST + 7)		/* Temporary ICC reg */#define FCC_FIRST	(CC_FIRST)		/* First FCC reg */#define FCC_LAST	(CC_FIRST + 3)		/* Last  FCC reg *//* Amount to shift a value to locate a ICC or FCC register in the CCR   register and shift it to the bottom 4 bits.  */#define CC_SHIFT_RIGHT(REGNO) (((REGNO) - CC_FIRST) << 2)/* Mask to isolate a single ICC/FCC value.  */#define CC_MASK		0xf/* Masks to isolate the various bits in an ICC field.  */#define ICC_MASK_N	0x8	/* negative */#define ICC_MASK_Z	0x4	/* zero */#define ICC_MASK_V	0x2	/* overflow */#define ICC_MASK_C	0x1	/* carry *//* Mask to isolate the N/Z flags in an ICC.  */#define ICC_MASK_NZ (ICC_MASK_N | ICC_MASK_Z)/* Mask to isolate the Z/C flags in an ICC.  */#define ICC_MASK_ZC (ICC_MASK_Z | ICC_MASK_C)/* Masks to isolate the various bits in a FCC field.  */#define FCC_MASK_E	0x8	/* equal */#define FCC_MASK_L	0x4	/* less than */#define FCC_MASK_G	0x2	/* greater than */#define FCC_MASK_U	0x1	/* unordered *//* For CCR registers, the machine wants CR4..CR7 to be used for integer   code and CR0..CR3 to be used for floating point.  */#define CR_FIRST	136			/* First CCR */#define CR_LAST		143			/* Last  CCR */#define CR_NUM		(CR_LAST-CR_FIRST+1)	/* # of CCRs (8) */#define ICR_FIRST	(CR_FIRST + 4)		/* First integer CCR */#define ICR_LAST	(CR_FIRST + 7)		/* Last  integer CCR */#define ICR_TEMP	ICR_LAST		/* Temp  integer CCR */#define FCR_FIRST	(CR_FIRST + 0)		/* First float CCR */#define FCR_LAST	(CR_FIRST + 3)		/* Last  float CCR *//* Amount to shift a value to locate a CR register in the CCCR special purpose   register and shift it to the bottom 2 bits.  */#define CR_SHIFT_RIGHT(REGNO) (((REGNO) - CR_FIRST) << 1)/* Mask to isolate a single CR value.  */#define CR_MASK		0x3#define ACC_FIRST	144			/* First acc register */#define ACC_LAST	155			/* Last  acc register */#define ACCG_FIRST	156			/* First accg register */#define ACCG_LAST	167			/* Last  accg register */#define AP_FIRST	168			/* fake argument pointer */

⌨️ 快捷键说明

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