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

📄 vax.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 3 页
字号:
/* Definitions of target machine for GNU compiler.  VAX version.   Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998,   1999, 2000, 2001, 2002 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.  *//* Target CPU builtins.  */#define TARGET_CPU_CPP_BUILTINS()		\  do						\    {						\      builtin_define ("__vax__");		\      builtin_assert ("cpu=vax");		\      builtin_assert ("machine=vax");		\      if (TARGET_G_FLOAT)			\	{					\	  builtin_define ("__GFLOAT");		\	  builtin_define ("__GFLOAT__");	\	}					\    }						\  while (0)#define VMS_TARGET 0/* Use -J option for long branch support with Unix assembler.  */#define ASM_SPEC "-J"/* Choose proper libraries depending on float format.   Note that there are no profiling libraries for g-format.   Also use -lg for the sake of dbx.  */#define LIB_SPEC "%{g:-lg}\ %{mg:%{lm:-lmg} -lcg \  %{p:%eprofiling not supported with -mg\n}\  %{pg:%eprofiling not supported with -mg\n}}\ %{!mg:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"/* Print subsidiary information on the compiler version in use.  */#ifndef TARGET_NAME	/* A more specific value might be supplied via -D.  */#define TARGET_NAME "vax"#endif#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME)/* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;#define MASK_UNIX_ASM		1#define MASK_VAXC_ALIGNMENT	2#define MASK_G_FLOAT		4/* Macros used in the machine description to test the flags.  *//* Nonzero if compiling code that Unix assembler can assemble.  */#define TARGET_UNIX_ASM (target_flags & MASK_UNIX_ASM)/* Nonzero if compiling with VAX-11 "C" style structure alignment */#define	TARGET_VAXC_ALIGNMENT (target_flags & MASK_VAXC_ALIGNMENT)/* Nonzero if compiling with `G'-format floating point */#define TARGET_G_FLOAT (target_flags & MASK_G_FLOAT)/* 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						\  { {"unix", MASK_UNIX_ASM,					\     "Generate code for UNIX assembler"},  			\    {"gnu", -MASK_UNIX_ASM,					\     "Generate code for GNU assembler (gas)"},  		\    {"vaxc-alignment", MASK_VAXC_ALIGNMENT,			\     "Use VAXC structure conventions"}, 			\    {"g", MASK_G_FLOAT,						\     "Generate GFLOAT double precision code"},			\    {"g-float", MASK_G_FLOAT,					\     "Generate GFLOAT double precision code"},			\    {"d", -MASK_G_FLOAT,					\     "Generate DFLOAT double precision code"},			\    {"d-float", -MASK_G_FLOAT,					\     "Generate DFLOAT double precision code"},			\    { "", TARGET_DEFAULT, 0}}/* Default target_flags if no switches specified.  */#ifndef TARGET_DEFAULT#define TARGET_DEFAULT (MASK_UNIX_ASM)#endif#define OVERRIDE_OPTIONS override_options ()/* 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 VAX.  */#define BITS_BIG_ENDIAN 0/* Define this if most significant byte of a word is the lowest numbered.  *//* That is not true on the VAX.  */#define BYTES_BIG_ENDIAN 0/* Define this if most significant word of a multiword number is the lowest   numbered.  *//* This is not true on the VAX.  */#define WORDS_BIG_ENDIAN 0/* Width of a word, in units (bytes).  */#define UNITS_PER_WORD 4/* 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 16/* Alignment of field after `int : 0' in a structure.  */#define EMPTY_FIELD_BOUNDARY (TARGET_VAXC_ALIGNMENT ? 8 : 32)/* Every structure's size must be a multiple of this.  */#define STRUCTURE_SIZE_BOUNDARY 8/* A bit-field declared as `int' forces `int' alignment for the struct.  */#define PCC_BITFIELD_TYPE_MATTERS (! TARGET_VAXC_ALIGNMENT)/* No data type wants to be aligned rounder than this.  */#define BIGGEST_ALIGNMENT 32/* No structure field wants to be aligned rounder than this.  */#define BIGGEST_FIELD_ALIGNMENT (TARGET_VAXC_ALIGNMENT ? 8 : 32)/* Set this nonzero if move instructions will actually fail to work   when given unaligned data.  */#define STRICT_ALIGNMENT 0/* Let's keep the stack somewhat aligned.  */#define STACK_BOUNDARY 32/* The table of an ADDR_DIFF_VEC must be contiguous with the case   opcode, it is part of the case instruction.  */#define ADDR_VEC_ALIGN(ADDR_VEC) 0/* 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 16/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.   On the VAX, these are the AP, FP, SP and PC.  */#define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 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, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 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 VAX, all registers are one word long.  */#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 VAX, all registers can hold all modes.  */#define HARD_REGNO_MODE_OK(REGNO, MODE) 1/* 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)  1/* Specify the registers used for certain standard purposes.   The values of these macros are register numbers.  *//* VAX pc is overloaded on a register.  */#define PC_REGNUM 15/* Register to use for pushing function arguments.  */#define STACK_POINTER_REGNUM 14/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM 13/* 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 12/* Register in which static-chain is passed to a function.  */#define STATIC_CHAIN_REGNUM 0/* Register in which address to store a structure value   is passed to a function.  */#define STRUCT_VALUE_REGNUM 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.  */   /* The VAX has only one kind of registers, so NO_REGS and ALL_REGS   are the only 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}, {0xffff}}/* 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, M, N, and O 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.   `I' is the constant zero.   `J' is a value between 0 .. 63 (inclusive)   `K' is a value between -128 and 127 (inclusive)   'L' is a value between -32768 and 32767 (inclusive)   `M' is a value between 0 and 255 (inclusive)   'N' is a value between 0 and 65535 (inclusive)   `O' is a value between -63 and -1 (inclusive)  */#define CONST_OK_FOR_LETTER_P(VALUE, C) \  (  (C) == 'I' ?	(VALUE) == 0				\   : (C) == 'J' ?	0 <= (VALUE) && (VALUE) < 64		\   : (C) == 'O' ?	-63 <= (VALUE) && (VALUE) < 0		\   : (C) == 'K' ?	-128 <= (VALUE) && (VALUE) < 128	\   : (C) == 'M' ?	0 <= (VALUE) && (VALUE) < 256		\   : (C) == 'L' ?	-32768 <= (VALUE) && (VALUE) < 32768	\   : (C) == 'N' ?	0 <= (VALUE) && (VALUE) < 65536		\   : 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' ? ((VALUE) == CONST0_RTX (DFmode)		\		 || (VALUE) == CONST0_RTX (SFmode))	\   : 0)/* Optional extra constraints for this machine.   For the VAX, `Q' means that OP is a MEM that does not have a mode-dependent   address.  */#define EXTRA_CONSTRAINT(OP, C) \  ((C) == 'Q'								\   ? GET_CODE (OP) == MEM && ! mode_dependent_address_p (XEXP (OP, 0))	\   : 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.  *//* On the VAX, this is always the size of MODE in words,   since all registers are the same size.  */#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.  */#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/* Given an rtx for the address of a frame,   return an rtx for the address of the word in the frame   that holds the dynamic chain--the previous frame's address.  */#define DYNAMIC_CHAIN_ADDRESS(FRAME) plus_constant ((FRAME), 12)/* If we generate an insn to push BYTES bytes,   this says how many the stack pointer really advances by.   On the VAX, -(sp) pushes only the bytes of the operands.  */#define PUSH_ROUNDING(BYTES) (BYTES)/* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL) 4/* Value is the number of bytes of arguments automatically   popped when returning from a subroutine call.   FUNDECL is the declaration node of the function (as a tree),   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.   SIZE is the number of bytes of arguments passed on the stack.   On the VAX, the RET insn pops a maximum of 255 args for any function.  */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \  ((SIZE) > 255*4 ? 0 : (SIZE))/* 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 VAX the return value is in R0 regardless.  */   #define FUNCTION_VALUE(VALTYPE, FUNC)  \  gen_rtx_REG (TYPE_MODE (VALTYPE), 0)/* Define how to find the value returned by a library function   assuming the value has mode MODE.  *//* On the VAX the return value is in R0 regardless.  */   #define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, 0)/* Define this if PCC uses the nonreentrant convention for returning   structure and union values.  */

⌨️ 快捷键说明

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