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

📄 arm.h

📁 俄罗斯高人Mamaich的Pocket gcc编译器(运行在PocketPC上)的全部源代码。
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions of target machine for GNU compiler, for ARM.   Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,   2001, 2002 Free Software Foundation, Inc.   Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)   and Martin Simmons (@harleqn.co.uk).   More major hacks by Richard Earnshaw (rearnsha@arm.com)   Minor hacks by Nick Clifton (nickc@cygnus.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 GCC_ARM_H#define GCC_ARM_H/* Target CPU builtins.  */#define TARGET_CPU_CPP_BUILTINS()			\  do							\    {							\	if (TARGET_ARM)					\	  builtin_define ("__arm__");			\	else						\	  builtin_define ("__thumb__");			\							\	if (TARGET_BIG_END)				\	  {						\	    builtin_define ("__ARMEB__");		\	    if (TARGET_THUMB)				\	      builtin_define ("__THUMBEB__");		\	    if (TARGET_LITTLE_WORDS)			\	      builtin_define ("__ARMWEL__");		\	  }						\        else						\	  {						\	    builtin_define ("__ARMEL__");		\	    if (TARGET_THUMB)				\	      builtin_define ("__THUMBEL__");		\	  }						\							\	if (TARGET_APCS_32)				\	  builtin_define ("__APCS_32__");		\	else						\	  builtin_define ("__APCS_26__");		\							\	if (TARGET_SOFT_FLOAT)				\	  builtin_define ("__SOFTFP__");		\							\	/* FIXME: TARGET_HARD_FLOAT currently implies	\	   FPA.  */					\	if (TARGET_VFP && !TARGET_HARD_FLOAT)		\	  builtin_define ("__VFP_FP__");		\							\	/* Add a define for interworking.		\	   Needed when building libgcc.a.  */		\	if (TARGET_INTERWORK)				\	  builtin_define ("__THUMB_INTERWORK__");	\							\	builtin_assert ("cpu=arm");			\	builtin_assert ("machine=arm");			\	  builtin_define ("__NO_LEADING_UNDERSCORES__");		\    } while (0)#define TARGET_CPU_arm2		0x0000#define TARGET_CPU_arm250	0x0000#define TARGET_CPU_arm3		0x0000#define TARGET_CPU_arm6		0x0001#define TARGET_CPU_arm600	0x0001#define TARGET_CPU_arm610	0x0002#define TARGET_CPU_arm7		0x0001#define TARGET_CPU_arm7m	0x0004#define TARGET_CPU_arm7dm	0x0004#define TARGET_CPU_arm7dmi	0x0004#define TARGET_CPU_arm700	0x0001#define TARGET_CPU_arm710	0x0002#define TARGET_CPU_arm7100	0x0002#define TARGET_CPU_arm7500	0x0002#define TARGET_CPU_arm7500fe	0x1001#define TARGET_CPU_arm7tdmi	0x0008#define TARGET_CPU_arm8		0x0010#define TARGET_CPU_arm810	0x0020#define TARGET_CPU_strongarm	0x0040#define TARGET_CPU_strongarm110 0x0040#define TARGET_CPU_strongarm1100 0x0040#define TARGET_CPU_arm9		0x0080#define TARGET_CPU_arm9tdmi	0x0080#define TARGET_CPU_xscale       0x0100/* Configure didn't specify.  */#define TARGET_CPU_generic	0x8000typedef enum arm_cond_code{  ARM_EQ = 0, ARM_NE, ARM_CS, ARM_CC, ARM_MI, ARM_PL, ARM_VS, ARM_VC,  ARM_HI, ARM_LS, ARM_GE, ARM_LT, ARM_GT, ARM_LE, ARM_AL, ARM_NV}arm_cc;extern arm_cc arm_current_cc;#define ARM_INVERSE_CONDITION_CODE(X)  ((arm_cc) (((int)X) ^ 1))extern int arm_target_label;extern int arm_ccfsm_state;extern GTY(()) rtx arm_target_insn;/* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;/* The floating point instruction architecture, can be 2 or 3 */extern const char * target_fp_name;/* Define the information needed to generate branch insns.  This is   stored from the compare operation.  */extern GTY(()) rtx arm_compare_op0;extern GTY(()) rtx arm_compare_op1;/* The label of the current constant pool.  */extern rtx pool_vector_label;/* Set to 1 when a return insn is output, this means that the epilogue   is not needed. */extern int return_used_this_function;/* Used to produce AOF syntax assembler.  */extern GTY(()) rtx aof_pic_label;/* Just in case configure has failed to define anything. */#ifndef TARGET_CPU_DEFAULT#define TARGET_CPU_DEFAULT TARGET_CPU_generic#endif/* If the configuration file doesn't specify the cpu, the subtarget may   override it.  If it doesn't, then default to an ARM6.  */#if TARGET_CPU_DEFAULT == TARGET_CPU_generic#undef TARGET_CPU_DEFAULT#ifdef SUBTARGET_CPU_DEFAULT#define TARGET_CPU_DEFAULT SUBTARGET_CPU_DEFAULT#else#define TARGET_CPU_DEFAULT TARGET_CPU_arm6#endif#endif#if TARGET_CPU_DEFAULT == TARGET_CPU_arm2#define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_2__"#else#if TARGET_CPU_DEFAULT == TARGET_CPU_arm6 || TARGET_CPU_DEFAULT == TARGET_CPU_arm610 || TARGET_CPU_DEFAULT == TARGET_CPU_arm7500fe#define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_3__"#else#if TARGET_CPU_DEFAULT == TARGET_CPU_arm7m#define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_3M__"#else#if TARGET_CPU_DEFAULT == TARGET_CPU_arm7tdmi || TARGET_CPU_DEFAULT == TARGET_CPU_arm9 || TARGET_CPU_DEFAULT == TARGET_CPU_arm9tdmi#define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_4T__"#else#if TARGET_CPU_DEFAULT == TARGET_CPU_arm8 || TARGET_CPU_DEFAULT == TARGET_CPU_arm810 || TARGET_CPU_DEFAULT == TARGET_CPU_strongarm || TARGET_CPU_DEFAULT == TARGET_CPU_strongarm110 || TARGET_CPU_DEFAULT == TARGET_CPU_strongarm1100 #define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_4__"#else#if TARGET_CPU_DEFAULT == TARGET_CPU_xscale#define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_5TE__ -D__XSCALE__"#elseUnrecognized value in TARGET_CPU_DEFAULT.#endif#endif#endif#endif#endif#endif#undef  CPP_SPEC#define CPP_SPEC "%(cpp_cpu_arch) %(subtarget_cpp_spec)			\%{mapcs-32:%{mapcs-26:							\	%e-mapcs-26 and -mapcs-32 may not be used together}}		\%{msoft-float:%{mhard-float:						\	%e-msoft-float and -mhard_float may not be used together}}	\%{mbig-endian:%{mlittle-endian:						\	%e-mbig-endian and -mlittle-endian may not be used together}}"/* Set the architecture define -- if -march= is set, then it overrides   the -mcpu= setting.  */#define CPP_CPU_ARCH_SPEC "\%{march=arm2:-D__ARM_ARCH_2__} \%{march=arm250:-D__ARM_ARCH_2__} \%{march=arm3:-D__ARM_ARCH_2__} \%{march=arm6:-D__ARM_ARCH_3__} \%{march=arm600:-D__ARM_ARCH_3__} \%{march=arm610:-D__ARM_ARCH_3__} \%{march=arm7:-D__ARM_ARCH_3__} \%{march=arm700:-D__ARM_ARCH_3__} \%{march=arm710:-D__ARM_ARCH_3__} \%{march=arm720:-D__ARM_ARCH_3__} \%{march=arm7100:-D__ARM_ARCH_3__} \%{march=arm7500:-D__ARM_ARCH_3__} \%{march=arm7500fe:-D__ARM_ARCH_3__} \%{march=arm7m:-D__ARM_ARCH_3M__} \%{march=arm7dm:-D__ARM_ARCH_3M__} \%{march=arm7dmi:-D__ARM_ARCH_3M__} \%{march=arm7tdmi:-D__ARM_ARCH_4T__} \%{march=arm8:-D__ARM_ARCH_4__} \%{march=arm810:-D__ARM_ARCH_4__} \%{march=arm9:-D__ARM_ARCH_4T__} \%{march=arm920:-D__ARM_ARCH_4__} \%{march=arm920t:-D__ARM_ARCH_4T__} \%{march=arm9tdmi:-D__ARM_ARCH_4T__} \%{march=strongarm:-D__ARM_ARCH_4__} \%{march=strongarm110:-D__ARM_ARCH_4__} \%{march=strongarm1100:-D__ARM_ARCH_4__} \%{march=xscale:-D__ARM_ARCH_5TE__} \%{march=xscale:-D__XSCALE__} \%{march=armv2:-D__ARM_ARCH_2__} \%{march=armv2a:-D__ARM_ARCH_2__} \%{march=armv3:-D__ARM_ARCH_3__} \%{march=armv3m:-D__ARM_ARCH_3M__} \%{march=armv4:-D__ARM_ARCH_4__} \%{march=armv4t:-D__ARM_ARCH_4T__} \%{march=armv5:-D__ARM_ARCH_5__} \%{march=armv5t:-D__ARM_ARCH_5T__} \%{march=armv5e:-D__ARM_ARCH_5E__} \%{march=armv5te:-D__ARM_ARCH_5TE__} \%{!march=*: \ %{mcpu=arm2:-D__ARM_ARCH_2__} \ %{mcpu=arm250:-D__ARM_ARCH_2__} \ %{mcpu=arm3:-D__ARM_ARCH_2__} \ %{mcpu=arm6:-D__ARM_ARCH_3__} \ %{mcpu=arm600:-D__ARM_ARCH_3__} \ %{mcpu=arm610:-D__ARM_ARCH_3__} \ %{mcpu=arm7:-D__ARM_ARCH_3__} \ %{mcpu=arm700:-D__ARM_ARCH_3__} \ %{mcpu=arm710:-D__ARM_ARCH_3__} \ %{mcpu=arm720:-D__ARM_ARCH_3__} \ %{mcpu=arm7100:-D__ARM_ARCH_3__} \ %{mcpu=arm7500:-D__ARM_ARCH_3__} \ %{mcpu=arm7500fe:-D__ARM_ARCH_3__} \ %{mcpu=arm7m:-D__ARM_ARCH_3M__} \ %{mcpu=arm7dm:-D__ARM_ARCH_3M__} \ %{mcpu=arm7dmi:-D__ARM_ARCH_3M__} \ %{mcpu=arm7tdmi:-D__ARM_ARCH_4T__} \ %{mcpu=arm8:-D__ARM_ARCH_4__} \ %{mcpu=arm810:-D__ARM_ARCH_4__} \ %{mcpu=arm9:-D__ARM_ARCH_4T__} \ %{mcpu=arm920:-D__ARM_ARCH_4__} \ %{mcpu=arm920t:-D__ARM_ARCH_4T__} \ %{mcpu=arm9tdmi:-D__ARM_ARCH_4T__} \ %{mcpu=strongarm:-D__ARM_ARCH_4__} \ %{mcpu=strongarm110:-D__ARM_ARCH_4__} \ %{mcpu=strongarm1100:-D__ARM_ARCH_4__} \ %{mcpu=xscale:-D__ARM_ARCH_5TE__} \ %{mcpu=xscale:-D__XSCALE__} \ %{!mcpu*:%(cpp_cpu_arch_default)}} \"#ifndef CC1_SPEC#define CC1_SPEC ""#endif/* This macro defines names of additional specifications to put in the specs   that can be used in various specifications like CC1_SPEC.  Its definition   is an initializer with a subgrouping for each command option.   Each subgrouping contains a string constant, that defines the   specification name, and a string constant that used by the GNU CC driver   program.   Do not define this macro if it does not need to do anything.  */#define EXTRA_SPECS						\  { "cpp_cpu_arch",		CPP_CPU_ARCH_SPEC },		\  { "cpp_cpu_arch_default",	CPP_ARCH_DEFAULT_SPEC },	\  { "subtarget_cpp_spec",	SUBTARGET_CPP_SPEC },           \  SUBTARGET_EXTRA_SPECS#ifndef SUBTARGET_EXTRA_SPECS#define SUBTARGET_EXTRA_SPECS#endif#ifndef SUBTARGET_CPP_SPEC#define SUBTARGET_CPP_SPEC      ""#endif/* Run-time Target Specification.  */#ifndef TARGET_VERSION#define TARGET_VERSION fputs (" (ARM/generic)", stderr);#endif/* Nonzero if the function prologue (and epilogue) should obey   the ARM Procedure Call Standard.  */#define ARM_FLAG_APCS_FRAME	(1 << 0)/* Nonzero if the function prologue should output the function name to enable   the post mortem debugger to print a backtrace (very useful on RISCOS,   unused on RISCiX).  Specifying this flag also enables   -fno-omit-frame-pointer.   XXX Must still be implemented in the prologue.  */#define ARM_FLAG_POKE		(1 << 1)/* Nonzero if floating point instructions are emulated by the FPE, in which   case instruction scheduling becomes very uninteresting.  */#define ARM_FLAG_FPE		(1 << 2)/* Nonzero if destined for a processor in 32-bit program mode.  Takes out bit   that assume restoration of the condition flags when returning from a   branch and link (ie a function).  */#define ARM_FLAG_APCS_32	(1 << 3)/* FLAGS 0x0008 and 0x0010 are now spare (used to be arm3/6 selection).  *//* Nonzero if stack checking should be performed on entry to each function   which allocates temporary variables on the stack.  */#define ARM_FLAG_APCS_STACK	(1 << 4)/* Nonzero if floating point parameters should be passed to functions in   floating point registers.  */#define ARM_FLAG_APCS_FLOAT	(1 << 5)/* Nonzero if re-entrant, position independent code should be generated.   This is equivalent to -fpic.  */#define ARM_FLAG_APCS_REENT	(1 << 6)/* Nonzero if the MMU will trap unaligned word accesses, so shorts must   be loaded using either LDRH or LDRB instructions.  */#define ARM_FLAG_MMU_TRAPS	(1 << 7)/* Nonzero if all floating point instructions are missing (and there is no   emulator either).  Generate function calls for all ops in this case.  */#define ARM_FLAG_SOFT_FLOAT	(1 << 8)/* Nonzero if we should compile with BYTES_BIG_ENDIAN set to 1.  */#define ARM_FLAG_BIG_END	(1 << 9)

⌨️ 快捷键说明

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