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

📄 alpha.h

📁 GCC编译器源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions of target machine for GNU compiler, for DEC Alpha.   Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.   Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)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.  *//* Names to predefine in the preprocessor for this target machine.  */#define CPP_PREDEFINES "\-Dunix -D__osf__ -D__alpha -D__alpha__ -D_LONGLONG -DSYSTYPE_BSD  \-D_SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -Acpu(alpha) -Amachine(alpha)"/* Write out the correct language type definition for the header files.     Unless we have assembler language, write out the symbols for C.  */#define CPP_SPEC "\%{!.S:	-D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}  \%{.S:	-D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \%{.cc:	-D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \%{.cxx:	-D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \%{.C:	-D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \%{.m:	-D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C} \%{mieee:-D_IEEE_FP} \%{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT}"/* Set the spec to use for signed char.  The default tests the above macro   but DEC's compiler can't handle the conditional in a "constant"   operand.  */#define SIGNED_CHAR_SPEC "%{funsigned-char:-D__CHAR_UNSIGNED__}"/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf.  */#define LIB_SPEC "%{p:-lprof1 -lpdf} %{pg:-lprof1 -lpdf} %{a:-lprof2} -lc"/* Pass "-G 8" to ld because Alpha's CC does.  Pass -O3 if we are   optimizing, -O1 if we are not.  Pass -shared, -non_shared or   -call_shared as appropriate.  Also pass -pg.  */#define LINK_SPEC  \  "-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \   %{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg} %{taso} \   %{rpath*}"#define WORD_SWITCH_TAKES_ARG(STR)		\ (!strcmp (STR, "rpath") || !strcmp (STR, "include")	\  || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \  || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \  || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \  || !strcmp (STR, "isystem"))#define STARTFILE_SPEC  \  "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}"/* Print subsidiary information on the compiler version in use.  */#define TARGET_VERSION/* Define the location for the startup file on OSF/1 for Alpha.  */#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/"/* Run-time compilation parameters selecting different hardware subsets.  *//* Which processor to schedule for. The cpu attribute defines a list that   mirrors this list, so changes to alpha.md must be made at the same time.  */enum processor_type {PROCESSOR_EV4,			/* 2106[46]{a,} */  PROCESSOR_EV5,			/* 21164{a,pc,} */  PROCESSOR_EV6};			/* 21264 */extern enum processor_type alpha_cpu;enum alpha_trap_precision{  ALPHA_TP_PROG,	/* No precision (default).  */  ALPHA_TP_FUNC,      	/* Trap contained within originating function.  */  ALPHA_TP_INSN		/* Instruction accuracy and code is resumption safe. */};enum alpha_fp_rounding_mode{  ALPHA_FPRM_NORM,	/* Normal rounding mode.  */  ALPHA_FPRM_MINF,	/* Round towards minus-infinity.  */  ALPHA_FPRM_CHOP,	/* Chopped rounding mode (towards 0). */  ALPHA_FPRM_DYN	/* Dynamic rounding mode.  */};enum alpha_fp_trap_mode{  ALPHA_FPTM_N,		/* Normal trap mode. */  ALPHA_FPTM_U,		/* Underflow traps enabled.  */  ALPHA_FPTM_SU,	/* Software completion, w/underflow traps */  ALPHA_FPTM_SUI	/* Software completion, w/underflow & inexact traps */};extern int target_flags;extern enum alpha_trap_precision alpha_tp;extern enum alpha_fp_rounding_mode alpha_fprm;extern enum alpha_fp_trap_mode alpha_fptm;/* This means that floating-point support exists in the target implementation   of the Alpha architecture.  This is usually the default.  */#define MASK_FP		1#define TARGET_FP	(target_flags & MASK_FP)/* This means that floating-point registers are allowed to be used.  Note   that Alpha implementations without FP operations are required to   provide the FP registers.  */#define MASK_FPREGS	2#define TARGET_FPREGS	(target_flags & MASK_FPREGS)/* This means that gas is used to process the assembler file.  */#define MASK_GAS 4#define TARGET_GAS	(target_flags & MASK_GAS)/* This means that we should mark procedures as IEEE conformant. */#define MASK_IEEE_CONFORMANT 8#define TARGET_IEEE_CONFORMANT	(target_flags & MASK_IEEE_CONFORMANT)/* This means we should be IEEE-compliant except for inexact.  */#define MASK_IEEE	16#define TARGET_IEEE	(target_flags & MASK_IEEE)/* This means we should be fully IEEE-compliant.  */#define MASK_IEEE_WITH_INEXACT 32#define TARGET_IEEE_WITH_INEXACT (target_flags & MASK_IEEE_WITH_INEXACT)/* This means we are compiling for Windows NT.  */#define MASK_WINDOWS_NT	64#define TARGET_WINDOWS_NT (target_flags & MASK_WINDOWS_NT)/* This means we must construct all constants rather than emitting   them as literal data.  */#define MASK_BUILD_CONSTANTS 128#define TARGET_BUILD_CONSTANTS (target_flags & MASK_BUILD_CONSTANTS)/* This means we are compiling for openVMS.  */#define MASK_OPEN_VMS	256#define TARGET_OPEN_VMS (target_flags & MASK_OPEN_VMS)/* This means we handle floating points in VAX F- (float)   or G- (double) Format.  */#define MASK_FLOAT_VAX 512#define TARGET_FLOAT_VAX (target_flags & MASK_FLOAT_VAX)/* This means that the processor has byte and half word loads and stores   (the BWX extension).  */#define MASK_BWX 1024#define TARGET_BWX	(target_flags & MASK_BWX)/* This means that the processor has the CIX extension.  */#define MASK_CIX 2048#define TARGET_CIX	(target_flags & MASK_CIX)/* This means that the processor has the MAX extension.  */#define MASK_MAX 4096#define TARGET_MAX	(target_flags & MASK_MAX)/* This means that the processor is an EV5, EV56, or PCA56.  This is defined   only in TARGET_CPU_DEFAULT.  */#define MASK_CPU_EV5 8192/* Likewise for EV6.  */#define MASK_CPU_EV6 16384/* This means we support the .arch directive in the assembler.  Only   defined in TARGET_CPU_DEFAULT.  */#define MASK_SUPPORT_ARCH 32768#define TARGET_SUPPORT_ARCH	(target_flags & MASK_SUPPORT_ARCH)/* 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				\  { {"no-soft-float", MASK_FP},			\    {"soft-float", - MASK_FP},			\    {"fp-regs", MASK_FPREGS},			\    {"no-fp-regs", - (MASK_FP|MASK_FPREGS)},	\    {"alpha-as", -MASK_GAS},			\    {"gas", MASK_GAS},				\    {"ieee-conformant", MASK_IEEE_CONFORMANT},	\    {"ieee", MASK_IEEE|MASK_IEEE_CONFORMANT},	\    {"ieee-with-inexact", MASK_IEEE_WITH_INEXACT|MASK_IEEE_CONFORMANT}, \    {"build-constants", MASK_BUILD_CONSTANTS},  \    {"float-vax", MASK_FLOAT_VAX},		\    {"float-ieee", -MASK_FLOAT_VAX},		\    {"bwx", MASK_BWX},				\    {"no-bwx", -MASK_BWX},			\    {"cix", MASK_CIX},				\    {"no-cix", -MASK_CIX},			\    {"max", MASK_MAX},				\    {"no-max", -MASK_MAX},			\    {"", TARGET_DEFAULT | TARGET_CPU_DEFAULT} }#define TARGET_DEFAULT MASK_FP|MASK_FPREGS#ifndef TARGET_CPU_DEFAULT#define TARGET_CPU_DEFAULT 0#endif/* This macro is similar to `TARGET_SWITCHES' but defines names of   command options that have values.  Its definition is an initializer   with a subgrouping for each command option.   Each subgrouping contains a string constant, that defines the fixed   part of the option name, and the address of a variable.  The   variable, type `char *', is set to the variable part of the given   option if the fixed part matches.  The actual option name is made   by appending `-m' to the specified name.   Here is an example which defines `-mshort-data-NUMBER'.  If the   given option is `-mshort-data-512', the variable `m88k_short_data'   will be set to the string `"512"'.	extern char *m88k_short_data;	#define TARGET_OPTIONS { { "short-data-", &m88k_short_data } }  */extern char *alpha_cpu_string;  /* For -mcpu=ev[4|5] */extern char *alpha_fprm_string;	/* For -mfp-rounding-mode=[n|m|c|d] */extern char *alpha_fptm_string;	/* For -mfp-trap-mode=[n|u|su|sui]  */extern char *alpha_tp_string;	/* For -mtrap-precision=[p|f|i] */#define TARGET_OPTIONS				\{						\  {"cpu=",		&alpha_cpu_string},	\  {"fp-rounding-mode=",	&alpha_fprm_string},	\  {"fp-trap-mode=",	&alpha_fptm_string},	\  {"trap-precision=",	&alpha_tp_string},	\}/* 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.   On the Alpha, it is used to translate target-option strings into   numeric values.  */extern void override_options ();#define OVERRIDE_OPTIONS override_options ()/* Define this macro to change register usage conditional on target flags.   On the Alpha, we use this to disable the floating-point registers when   they don't exist.  */#define CONDITIONAL_REGISTER_USAGE	\  if (! TARGET_FPREGS)			\    for (i = 32; i < 63; i++)		\      fixed_regs[i] = call_used_regs[i] = 1;/* Show we can debug even without a frame pointer.  */#define CAN_DEBUG_WITHOUT_FP/* target machine storage layout *//* Define to enable software floating point emulation. */#define REAL_ARITHMETIC/* The following #defines are used when compiling the routines in   libgcc1.c.  Since the Alpha calling conventions require single   precision floats to be passed in the floating-point registers   (rather than in the general registers) we have to build the   libgcc1.c routines in such a way that they know the actual types   of their formal arguments and the actual types of their return   values.  Otherwise, gcc will generate calls to the libgcc1.c   routines, passing arguments in the floating-point registers,   but the libgcc1.c routines will expect their arguments on the   stack (where the Alpha calling conventions require structs &   unions to be passed).  */#define FLOAT_VALUE_TYPE	double#define INTIFY(FLOATVAL)	(FLOATVAL)#define FLOATIFY(INTVAL)	(INTVAL)#define FLOAT_ARG_TYPE		double/* Define the size of `int'.  The default is the same as the word size.  */#define INT_TYPE_SIZE 32/* Define the size of `long long'.  The default is the twice the word size.  */#define LONG_LONG_TYPE_SIZE 64/* The two floating-point formats we support are S-floating, which is   4 bytes, and T-floating, which is 8 bytes.  `float' is S and `double'   and `long double' are T.  */#define FLOAT_TYPE_SIZE 32#define DOUBLE_TYPE_SIZE 64#define LONG_DOUBLE_TYPE_SIZE 64#define	WCHAR_TYPE "unsigned int"#define	WCHAR_TYPE_SIZE 32/* 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.   For Alpha, we always store objects in a full register.  32-bit objects   are always sign-extended, but smaller objects retain their signedness.  */#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)  \  if (GET_MODE_CLASS (MODE) == MODE_INT		\      && GET_MODE_SIZE (MODE) < UNITS_PER_WORD)	\    {						\      if ((MODE) == SImode)			\	(UNSIGNEDP) = 0;			\      (MODE) = DImode;				\    }/* Define this if function arguments should also be promoted using the above   procedure.  */

⌨️ 快捷键说明

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