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

📄 s390.h

📁 gcc3.2.1源代码
💻 H
📖 第 1 页 / 共 4 页
字号:
/* Definitions of target machine for GNU compiler, for IBM S/390   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.   Contributed by Hartmut Penner (hpenner@de.ibm.com) and                  Ulrich Weigand (uweigand@de.ibm.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.  */#ifndef _S390_H#define _S390_Hextern int flag_pic; /* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;/* Target macros checked at runtime of compiler.  */#define TARGET_HARD_FLOAT          (target_flags & 1)#define TARGET_SOFT_FLOAT          (!(target_flags & 1))#define TARGET_BACKCHAIN           (target_flags & 2)#define TARGET_SMALL_EXEC          (target_flags & 4)#define TARGET_DEBUG_ARG           (target_flags & 8)#define TARGET_64BIT               (target_flags & 16)#define TARGET_MVCLE               (target_flags & 32)#ifdef DEFAULT_TARGET_64BIT#define TARGET_DEFAULT             0x13#define TARGET_VERSION fprintf (stderr, " (zSeries)");#else#define TARGET_DEFAULT             0x3#define TARGET_VERSION fprintf (stderr, " (S/390)");#endif/* 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           		       		       \{ { "hard-float",    1, N_("Use hardware fp")},         		       \  { "soft-float",   -1, N_("Don't use hardware fp")},	      	       \  { "backchain",     2, N_("Set backchain")},           		       \  { "no-backchain", -2, N_("Don't set backchain (faster, but debug harder")}, \  { "small-exec",    4, N_("Use bras for execucable < 64k")},           \  { "no-small-exec",-4, N_("Don't use bras")},            	       \  { "debug",         8, N_("Additional debug prints")},        	       \  { "no-debug",     -8, N_("Don't print additional debug prints")},     \  { "64",           16, N_("64 bit mode")},         	               \  { "31",          -16, N_("31 bit mode")},                             \  { "mvcle",        32, N_("mvcle use")},         	               \  { "no-mvcle",    -32, N_("mvc&ex")},                                  \  { "", TARGET_DEFAULT, 0 } }/* Define this to change the optimizations performed by default.  */#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options(LEVEL, SIZE)/* Sometimes certain combinations of command options do not make sense   on a particular target machine.  You can define a macro   `OVERRIDE_OPTIONS' to take account of this.  This macro, if   defined, is executed once just after all the command options have   been parsed.  */#define OVERRIDE_OPTIONS override_options ()/* Defines for REAL_ARITHMETIC.  */#define IEEE_FLOAT 1#define TARGET_IBM_FLOAT           0#define TARGET_IEEE_FLOAT          1 /* The current function count for create unique internal labels.  */extern int s390_function_count;/* The amount of space used for outgoing arguments.  */extern int current_function_outgoing_args_size;/* 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 1/* Define this if most significant byte of a word is the lowest numbered.  */#define BYTES_BIG_ENDIAN 1/* Define this if MS word of a multiword is the lowest numbered.  */#define WORDS_BIG_ENDIAN 1/* 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.  */#define BITS_PER_WORD (TARGET_64BIT ? 64 : 32)#define MAX_BITS_PER_WORD 64/* Width of a word, in units (bytes).  */#define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)#define MIN_UNITS_PER_WORD 4/* Width in bits of a pointer.  See also the macro `Pmode' defined below.  */#define POINTER_SIZE (TARGET_64BIT ? 64 : 32)/* A C expression for the size in bits of the type `short' on the   target machine.  If you don't define this, the default is half a   word.  (If this would be less than one storage unit, it is   rounded up to one unit.)  */#define SHORT_TYPE_SIZE 16/* A C expression for the size in bits of the type `int' on the   target machine.  If you don't define this, the default is one   word.  */#define INT_TYPE_SIZE 32/* A C expression for the size in bits of the type `long' on the   target machine.  If you don't define this, the default is one   word.  */#define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32)#define MAX_LONG_TYPE_SIZE 64/* A C expression for the size in bits of the type `long long' on the   target machine.  If you don't define this, the default is two   words.  */#define LONG_LONG_TYPE_SIZE 64/* Right now we only support two floating point formats, the    32 and 64 bit ieee formats.  */#define FLOAT_TYPE_SIZE 32#define DOUBLE_TYPE_SIZE 64#define LONG_DOUBLE_TYPE_SIZE 64/* Define this macro if it is advisable to hold scalars in registers   in a wider mode than that declared by the program.  In such cases,   the value is constrained to be within the bounds of the declared   type, but kept valid in the wider mode.  The signedness of the   extension may differ from that of the type.  */#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE)		\if (INTEGRAL_MODE_P (MODE) &&	        	    	\    GET_MODE_SIZE (MODE) < UNITS_PER_WORD) { 		\  (MODE) = Pmode;					\	  }/* Defining PROMOTE_FUNCTION_ARGS eliminates some unnecessary zero/sign   extensions applied to char/short functions arguments.  Defining   PROMOTE_FUNCTION_RETURN does the same for function returns.  */#define PROMOTE_FUNCTION_ARGS#define PROMOTE_FUNCTION_RETURN#define PROMOTE_FOR_CALL_ONLY/* 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 (TARGET_64BIT ? 64 : 32)/* Boundary (in *bits*) on which stack pointer should be aligned.  */#define STACK_BOUNDARY 64/* Allocation boundary (in *bits*) for the code of a function.  */#define FUNCTION_BOUNDARY 32/* There is no point aligning anything to a rounder boundary than this.  */#define BIGGEST_ALIGNMENT 64/* Alignment of field after `int : 0' in a structure.  */#define EMPTY_FIELD_BOUNDARY 32/* Alignment on even addresses for LARL instruction.  */#define CONSTANT_ALIGNMENT(EXP, ALIGN) (ALIGN) < 16 ? 16 : (ALIGN)#define DATA_ALIGNMENT(TYPE, ALIGN) (ALIGN) < 16 ? 16 : (ALIGN)/* Define this if move instructions will actually fail to work when given   unaligned data.  */#define STRICT_ALIGNMENT 0/* real arithmetic */#define REAL_ARITHMETIC/* Define target floating point format.  */#undef TARGET_FLOAT_FORMAT#ifdef IEEE_FLOAT#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT#else#define TARGET_FLOAT_FORMAT IBM_FLOAT_FORMAT#endif/* Define if special allocation order desired.  */#define REG_ALLOC_ORDER                                         \{  1, 2, 3, 4, 5, 0, 14, 13, 12, 11, 10, 9, 8, 7, 6,            \   16, 17, 18, 19, 20, 21, 22, 23,                              \   24, 25, 26, 27, 28, 29, 30, 31,                              \   15, 32, 33, 34 }/* Standard register usage.  */ #define INT_REGNO_P(N)   ( (int)(N) >= 0 && (N) < 16 )#ifdef IEEE_FLOAT#define FLOAT_REGNO_P(N) ( (N) >= 16 && (N) < 32 )#else#define FLOAT_REGNO_P(N) ( (N) >= 16 && (N) < 20 )#endif#define CC_REGNO_P(N)    ( (N) == 33 )/* 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.   For the 390, we give the data registers numbers 0-15,   and the floating point registers numbers 16-19.   G5 and following have 16 IEEE floating point register,   which get numbers 16-31.  */#define FIRST_PSEUDO_REGISTER 35/* Number of hardware registers that go into the DWARF-2 unwind info.   If not defined, equals FIRST_PSEUDO_REGISTER.  */#define DWARF_FRAME_REGISTERS 34/* The following register have a fix usage   GPR 12: GOT register points to the GOT, setup in prologue,           GOT contains pointer to variables in shared libraries    GPR 13: Base register setup in prologue to point to the           literal table of each function   GPR 14: Return registers holds the return address   GPR 15: Stack pointer */#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM)#define BASE_REGISTER 13#define RETURN_REGNUM 14#define STACK_POINTER_REGNUM 15#define FIXED_REGISTERS				\{ 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, 					\  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.  */#define CALL_USED_REGISTERS			\{ 1, 1, 1, 1, 					\  1, 1, 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, 1, 					\  1, 1, 1 }/* Like `CALL_USED_REGISTERS' except this macro doesn't require that   the entire set of `FIXED_REGISTERS' be included.   (`CALL_USED_REGISTERS' must be a superset of `FIXED_REGISTERS').  */#define CALL_REALLY_USED_REGISTERS		\{ 1, 1, 1, 1, 					\  1, 1, 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, 1 }/* Macro to conditionally modify fixed_regs/call_used_regs.  */#define CONDITIONAL_REGISTER_USAGE				\do								\  {								\    int i;							\								\    if (flag_pic)						\      {								\	fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;		\	call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;		\      }								\    if (TARGET_64BIT)						\      {								\        for (i = 24; i < 32; i++)				\	    call_used_regs[i] = call_really_used_regs[i] = 0;	\      }								\    else							\      {								\        for (i = 18; i < 20; i++)				\	    call_used_regs[i] = call_really_used_regs[i] = 0;	\      }								\ } while (0)/* The following register have a special usage   GPR 11: Frame pointer if needed to point to automatic variables.    GPR 32: In functions with more the 5 args this register           points to that arguments, it is always eliminated	   with stack- or frame-pointer.    GPR 33: Condition code 'register' */#define HARD_FRAME_POINTER_REGNUM 11#define FRAME_POINTER_REGNUM 34

⌨️ 快捷键说明

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