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

📄 s390.h

📁 linux下编程用 编译软件
💻 H
📖 第 1 页 / 共 3 页
字号:
/* Definitions of target machine for GNU compiler, for IBM S/390   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006   Free Software Foundation, Inc.   Contributed by Hartmut Penner (hpenner@de.ibm.com) and                  Ulrich Weigand (uweigand@de.ibm.com).This file is part of GCC.GCC is free software; you can redistribute it and/or modify it underthe terms of the GNU General Public License as published by the FreeSoftware Foundation; either version 2, or (at your option) any laterversion.GCC is distributed in the hope that it will be useful, but WITHOUT ANYWARRANTY; without even the implied warranty of MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public Licensefor more details.You should have received a copy of the GNU General Public Licensealong with GCC; see the file COPYING.  If not, write to the FreeSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA02110-1301, USA.  */#ifndef _S390_H#define _S390_H/* Override the __fixdfdi etc. routines when building libgcc2.   ??? This should be done in a cleaner way ...  */#if defined (IN_LIBGCC2) && !defined (__s390x__)#include <config/s390/fixdfdi.h>#endif/* Which processor to generate code or schedule for. The cpu attribute   defines a list that mirrors this list, so changes to s390.md must be   made at the same time.  */enum processor_type{  PROCESSOR_9672_G5,  PROCESSOR_9672_G6,  PROCESSOR_2064_Z900,  PROCESSOR_2084_Z990,  PROCESSOR_2094_Z9_109,  PROCESSOR_max};/* Optional architectural facilities supported by the processor.  */enum processor_flags{  PF_IEEE_FLOAT = 1,  PF_ZARCH = 2,  PF_LONG_DISPLACEMENT = 4,  PF_EXTIMM = 8};extern enum processor_type s390_tune;extern enum processor_flags s390_tune_flags;extern enum processor_type s390_arch;extern enum processor_flags s390_arch_flags;#define TARGET_CPU_IEEE_FLOAT \	(s390_arch_flags & PF_IEEE_FLOAT)#define TARGET_CPU_ZARCH \	(s390_arch_flags & PF_ZARCH)#define TARGET_CPU_LONG_DISPLACEMENT \	(s390_arch_flags & PF_LONG_DISPLACEMENT)#define TARGET_CPU_EXTIMM \ 	(s390_arch_flags & PF_EXTIMM)#define TARGET_LONG_DISPLACEMENT \       (TARGET_ZARCH && TARGET_CPU_LONG_DISPLACEMENT)#define TARGET_EXTIMM \       (TARGET_ZARCH && TARGET_CPU_EXTIMM)/* Run-time target specification.  *//* Defaults for option flags defined only on some subtargets.  */#ifndef TARGET_TPF_PROFILING#define TARGET_TPF_PROFILING 0#endif/* This will be overridden by OS headers.  */#define TARGET_TPF 0/* Target CPU builtins.  */#define TARGET_CPU_CPP_BUILTINS()			\  do							\    {							\      builtin_assert ("cpu=s390");			\      builtin_assert ("machine=s390");			\      builtin_define ("__s390__");			\      if (TARGET_64BIT)					\        builtin_define ("__s390x__");			\      if (TARGET_LONG_DOUBLE_128)			\        builtin_define ("__LONG_DOUBLE_128__");		\    }							\  while (0)/* ??? Once this actually works, it could be made a runtime option.  */#define TARGET_IBM_FLOAT           0#define TARGET_IEEE_FLOAT          1#ifdef DEFAULT_TARGET_64BIT#define TARGET_DEFAULT             (MASK_64BIT | MASK_ZARCH | MASK_HARD_FLOAT)#else#define TARGET_DEFAULT             MASK_HARD_FLOAT#endif/* Support for configure-time defaults.  */#define OPTION_DEFAULT_SPECS 					\  { "mode", "%{!mesa:%{!mzarch:-m%(VALUE)}}" },			\  { "arch", "%{!march=*:-march=%(VALUE)}" },			\  { "tune", "%{!mtune=*:-mtune=%(VALUE)}" }/* Defaulting rules.  */#ifdef DEFAULT_TARGET_64BIT#define DRIVER_SELF_SPECS					\  "%{!m31:%{!m64:-m64}}",					\  "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}",		\  "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}"#else#define DRIVER_SELF_SPECS					\  "%{!m31:%{!m64:-m31}}",					\  "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}",		\  "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}"#endif/* Target version string.  Overridden by the OS header.  */#ifdef DEFAULT_TARGET_64BIT#define TARGET_VERSION fprintf (stderr, " (zSeries)");#else#define TARGET_VERSION fprintf (stderr, " (S/390)");#endif/* Hooks to override options.  */#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options(LEVEL, SIZE)#define OVERRIDE_OPTIONS override_options ()/* Frame pointer is not used for debugging.  */#define CAN_DEBUG_WITHOUT_FP/* In libgcc2, determine target settings as compile-time constants.  */#ifdef IN_LIBGCC2#undef TARGET_64BIT#ifdef __s390x__#define TARGET_64BIT 1#else#define TARGET_64BIT 0#endif#endif/* Target machine storage layout.  *//* Everything is big-endian.  */#define BITS_BIG_ENDIAN 1#define BYTES_BIG_ENDIAN 1#define WORDS_BIG_ENDIAN 1/* Width of a word, in units (bytes).  */#define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)#ifndef IN_LIBGCC2#define MIN_UNITS_PER_WORD 4#endif#define MAX_BITS_PER_WORD 64/* Function arguments and return values are promoted to word size.  */#define PROMOTE_FUNCTION_MODE(MODE, UNSIGNEDP, TYPE)		\if (INTEGRAL_MODE_P (MODE) &&	        	    	\    GET_MODE_SIZE (MODE) < UNITS_PER_WORD) { 		\  (MODE) = Pmode;					\	  }/* 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)/* Alignment is not required by the hardware.  */#define STRICT_ALIGNMENT 0/* Mode of stack savearea.   FUNCTION is VOIDmode because calling convention maintains SP.   BLOCK needs Pmode for SP.   NONLOCAL needs twice Pmode to maintain both backchain and SP.  */#define STACK_SAVEAREA_MODE(LEVEL)      \  (LEVEL == SAVE_FUNCTION ? VOIDmode    \  : LEVEL == SAVE_NONLOCAL ? (TARGET_64BIT ? OImode : TImode) : Pmode)/* Define target floating point format.  */#define TARGET_FLOAT_FORMAT \  (TARGET_IEEE_FLOAT? IEEE_FLOAT_FORMAT : IBM_FLOAT_FORMAT)/* Type layout.  *//* Sizes in bits of the source language data types.  */#define SHORT_TYPE_SIZE 16#define INT_TYPE_SIZE 32#define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32)#define LONG_LONG_TYPE_SIZE 64#define FLOAT_TYPE_SIZE 32#define DOUBLE_TYPE_SIZE 64#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64)/* Define this to set long double type size to use in libgcc2.c, which can   not depend on target_flags.  */#ifdef __LONG_DOUBLE_128__#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128#else#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64#endif/* Work around target_flags dependency in ada/targtyps.c.  */#define WIDEST_HARDWARE_FP_SIZE 64/* We use "unsigned char" as default.  */#define DEFAULT_SIGNED_CHAR 0/* Register usage.  *//* We have 16 general purpose registers (registers 0-15),   and 16 floating point registers (registers 16-31).   (On non-IEEE machines, we have only 4 fp registers.)   Amongst the general purpose registers, some are used   for specific purposes:   GPR 11: Hard frame pointer (if needed)   GPR 12: Global offset table pointer (if needed)   GPR 13: Literal pool base register   GPR 14: Return address register   GPR 15: Stack pointer   Registers 32-35 are 'fake' hard registers that do not   correspond to actual hardware:   Reg 32: Argument pointer   Reg 33: Condition code   Reg 34: Frame pointer     Reg 35: Return address pointer   Registers 36 and 37 are mapped to access registers    0 and 1, used to implement thread-local storage.  */#define FIRST_PSEUDO_REGISTER 38/* Standard register usage.  */#define GENERAL_REGNO_P(N)	((int)(N) >= 0 && (N) < 16)#define ADDR_REGNO_P(N)		((N) >= 1 && (N) < 16)#define FP_REGNO_P(N)		((N) >= 16 && (N) < (TARGET_IEEE_FLOAT? 32 : 20))#define CC_REGNO_P(N)		((N) == 33)#define FRAME_REGNO_P(N)	((N) == 32 || (N) == 34 || (N) == 35)#define ACCESS_REGNO_P(N)	((N) == 36 || (N) == 37)#define GENERAL_REG_P(X)	(REG_P (X) && GENERAL_REGNO_P (REGNO (X)))#define ADDR_REG_P(X)		(REG_P (X) && ADDR_REGNO_P (REGNO (X)))#define FP_REG_P(X)		(REG_P (X) && FP_REGNO_P (REGNO (X)))#define CC_REG_P(X)		(REG_P (X) && CC_REGNO_P (REGNO (X)))#define FRAME_REG_P(X)		(REG_P (X) && FRAME_REGNO_P (REGNO (X)))#define ACCESS_REG_P(X)		(REG_P (X) && ACCESS_REGNO_P (REGNO (X)))/* Set up fixed registers and calling convention:   GPRs 0-5 are always call-clobbered,   GPRs 6-15 are always call-saved.   GPR 12 is fixed if used as GOT pointer.   GPR 13 is always fixed (as literal pool pointer).   GPR 14 is always fixed on S/390 machines (as return address).   GPR 15 is always fixed (as stack pointer).   The 'fake' hard registers are call-clobbered and fixed.   The access registers are call-saved and fixed.   On 31-bit, FPRs 18-19 are call-clobbered;   on 64-bit, FPRs 24-31 are call-clobbered.   The remaining FPRs are call-saved.  */#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,					\  1, 1 }#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, 1,					\  1, 1 }#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, 1,					\  0, 0 }#define CONDITIONAL_REGISTER_USAGE s390_conditional_register_usage ()/* Preferred register allocation order.  */#define REG_ALLOC_ORDER                                         \{  1, 2, 3, 4, 5, 0, 12, 11, 10, 9, 8, 7, 6, 14, 13,            \   16, 17, 18, 19, 20, 21, 22, 23,                              \   24, 25, 26, 27, 28, 29, 30, 31,                              \   15, 32, 33, 34, 35, 36, 37 }/* Fitting values into registers.  *//* Integer modes <= word size fit into any GPR.

⌨️ 快捷键说明

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