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

📄 arm.h

📁 gcc库的原代码,对编程有很大帮助.
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions of target machine for GNU compiler, for Acorn RISC Machine.   Copyright (C) 1991, 1993, 1994, 1995 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 (rwe11@cl.cam.ac.uk)   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.  *//* Sometimes the directive `riscos' is checked.  This does not imply that this   tm file can be used unchanged to build a GCC for RISC OS.   (Since in fact, it can't.)  */extern void output_func_prologue ();extern void output_func_epilogue ();extern char *output_add_immediate ();extern char *output_call ();extern char *output_call_mem ();extern char *output_move_double ();extern char *output_mov_double_fpu_from_arm ();extern char *output_mov_double_arm_from_fpu ();extern char *output_mov_long_double_fpu_from_arm ();extern char *output_mov_long_double_arm_from_fpu ();extern char *output_mov_long_double_arm_from_arm ();extern char *output_mov_immediate ();extern char *output_multi_immediate ();extern char *output_return_instruction ();extern char *output_load_symbol ();extern char *fp_immediate_constant ();extern struct rtx_def *gen_compare_reg ();extern struct rtx_def *arm_gen_store_multiple ();extern struct rtx_def *arm_gen_load_multiple ();extern char *arm_condition_codes[];/* This is needed by the tail-calling peepholes */extern int frame_pointer_needed;#ifndef CPP_PREDEFINES#define CPP_PREDEFINES  "-Darm -Acpu(arm) -Amachine(arm)"#endif#ifndef CPP_SPEC#define CPP_SPEC "%{m6:-D__arm6__}"#endif/* Run-time Target Specification.  */#ifndef TARGET_VERSION#define TARGET_VERSION  \  fputs (" (ARM/generic)", stderr);#endif/* Run-time compilation parameters selecting different hardware subsets.   On the ARM, misuse it in a different way.  */extern int target_flags;/* Nonzero if the function prologue (and epilogue) should obey   the ARM Procedure Call Standard.  */#define TARGET_APCS	(target_flags & 1)/* 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 -mapcs.   XXX Must still be implemented in the prologue.  */#define TARGET_POKE_FUNCTION_NAME	(target_flags & 2)/* Nonzero if floating point instructions are emulated by the FPE, in which   case instruction scheduling becomes very uninteresting.  */#define TARGET_FPE	(target_flags & 4)/* Nonzero if destined for an ARM6xx.  Takes out bits that assume restoration   of condition flags when returning from a branch & link (ie. a function) */#define TARGET_6        (target_flags & 8)/* Leave some bits for new processor variants *//* Nonzero if shorts must be loaded byte at a time.  This is not necessary   for the arm processor chip, but it is needed for some MMU chips.  */#define TARGET_SHORT_BY_BYTES	(target_flags & 0x200)/* Nonzero if GCC should use a floating point library.   GCC will assume the fp regs don't exist and will not emit any fp insns.   Note that this is different than fp emulation which still uses fp regs   and insns - the kernel catches the trap and performs the operation.  */#define TARGET_SOFT_FLOAT	(target_flags & 0x400)#define TARGET_HARD_FLOAT	(! TARGET_SOFT_FLOAT)/* SUBTARGET_SWITCHES is used to add flags on a per-config basis.   Bit 31 is reserved.  See riscix.h.  */#ifndef SUBTARGET_SWITCHES#define SUBTARGET_SWITCHES#endif#define TARGET_SWITCHES  				\{                         				\  {"apcs",		 	 1},			\  {"poke-function-name", 	 2},			\  {"fpe",		 	 4},			\  {"6",				 8},			\  {"2",				-8},			\  {"3",				-8},			\  {"short-load-bytes",		 (0x200)},		\  {"no-short-load-bytes",	-(0x200)},		\  {"short-load-words", 		-(0x200)},		\  {"no-short-load-words",	 (0x200)},		\  {"soft-float",		 (0x400)},		\  {"hard-float",		-(0x400)},		\  SUBTARGET_SWITCHES					\  {"",   		 	 TARGET_DEFAULT }	\}/* Which processor we are running on.  Currently this is only used to   get the condition code clobbering attribute right when we are running on   an arm 6 */enum processor_type {  PROCESSOR_ARM2,  PROCESSOR_ARM3,  PROCESSOR_ARM6};/* Recast the cpu class to be the cpu attribute. *//* Recast the cpu class to be the cpu attribute.  */#define arm_cpu_attr ((enum attr_cpu)arm_cpu)extern enum processor_type arm_cpu;/* What sort of floating point unit do we have? Hardware or software.  */enum floating_point_type{  FP_HARD,  FP_SOFT};/* Recast the floating point class to be the floating point attribute.  */#define arm_fpu_attr ((enum attr_fpu) arm_fpu)extern enum floating_point_type arm_fpu;#ifndef TARGET_DEFAULT#define TARGET_DEFAULT  0#endif#define TARGET_MEM_FUNCTIONS 1/* OVERRIDE_OPTIONS takes care of the following:   - if -mpoke-function-name, then -mapcs.   - if doing debugging, then -mapcs; if RISCOS, then -mpoke-function-name.   - if floating point is done by emulation, forget about instruction     scheduling.  Note that this only saves compilation time; it doesn't     matter for the final code.  */#define OVERRIDE_OPTIONS  \{								\  if (write_symbols != NO_DEBUG && flag_omit_frame_pointer)	\    warning ("-g without a frame pointer may not give sensible debugging");\  if (TARGET_POKE_FUNCTION_NAME)				\    target_flags |= 1;						\  if (TARGET_FPE)						\    flag_schedule_insns = flag_schedule_insns_after_reload = 0;	\  arm_cpu = TARGET_6 ? PROCESSOR_ARM6: PROCESSOR_ARM2;		\}/* Target machine storage Layout.  *//* 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.  *//* It is far faster to zero extend chars than to sign extend them */#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)  \  if (GET_MODE_CLASS (MODE) == MODE_INT		\      && GET_MODE_SIZE (MODE) < 4)      	\    {						\      if (MODE == QImode)			\	UNSIGNEDP = 1;				\      else if (MODE == HImode)			\	UNSIGNEDP = TARGET_SHORT_BY_BYTES != 0;	\      (MODE) = SImode;				\    }/* Define for XFmode extended real floating point support.   This will automatically cause REAL_ARITHMETIC to be defined.  *//* For the ARM:   I think I have added all the code to make this work.  Unfortunately,   early releases of the floating point emulation code on RISCiX used a   different format for extended precision numbers.  On my RISCiX box there   is a bug somewhere which causes the machine to lock up when running enquire   with long doubles.  There is the additional aspect that Norcroft C   treats long doubles as doubles and we ought to remain compatible.   Perhaps someone with an FPA coprocessor and not running RISCiX would like   to try this someday. *//* #define LONG_DOUBLE_TYPE_SIZE 96 *//* Disable XFmode patterns in md file */#define ENABLE_XF_PATTERNS 0/* Define if you don't want extended real, but do want to use the   software floating point emulator for REAL_ARITHMETIC and   decimal <-> binary conversion. *//* See comment above */#define REAL_ARITHMETIC/* Define this if most significant bit is lowest numbered   in instructions that operate on numbered bit-fields.  */#define BITS_BIG_ENDIAN  0/* Define this if most significant byte of a word is the lowest numbered.     Most ARM processors are run in little endian mode, so that is the default.   If you want to have it run-time selectable, change the definition in a   cover file to be TARGET_BIG_ENDIAN.  */#define BYTES_BIG_ENDIAN  0/* Define this if most significant word of a multiword number is the lowest   numbered.  */#define WORDS_BIG_ENDIAN  0/* Define this if most significant word of doubles is the lowest numbered */#define FLOAT_WORDS_BIG_ENDIAN 1/* Number of bits in an addressable storage unit */#define BITS_PER_UNIT  8#define BITS_PER_WORD  32#define UNITS_PER_WORD	4#define POINTER_SIZE  32#define PARM_BOUNDARY  	32#define STACK_BOUNDARY  32#define FUNCTION_BOUNDARY  32#define EMPTY_FIELD_BOUNDARY  32#define BIGGEST_ALIGNMENT  32/* Make strings word-aligned so strcpy from constants will be faster.  */#define CONSTANT_ALIGNMENT(EXP, ALIGN)  \  (TREE_CODE (EXP) == STRING_CST        \   && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))/* Every structures size must be a multiple of 32 bits.  */#define STRUCTURE_SIZE_BOUNDARY 32/* Non-zero if move instructions will actually fail to work   when given unaligned data.  */#define STRICT_ALIGNMENT 1#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT/* Define number of bits in most basic integer type.   (If undefined, default is BITS_PER_WORD).  *//* #define INT_TYPE_SIZE *//* Standard register usage.  *//* Register allocation in ARM Procedure Call Standard (as used on RISCiX):   (S - saved over call).	r0	   *	argument word/integer result	r1-r3		argument word	r4-r8	     S	register variable	r9	     S	(rfp) register variable (real frame pointer)	r10  	   F S	(sl) stack limit (not currently used)	r11 	   F S	(fp) argument pointer	r12		(ip) temp workspace	r13  	   F S	(sp) lower end of current stack frame	r14		(lr) link address/workspace	r15	   F	(pc) program counter	f0		floating point result	f1-f3		floating point scratch	f4-f7	     S	floating point variable	cc		This is NOT a real register, but is used internally	                to represent things that use or set the condition			codes.	sfp             This isn't either.  It is used during rtl generation	                since the offset between the frame pointer and the			auto's isn't known until after register allocation.	afp		Nor this, we only need this because of non-local	                goto.  Without it fp appears to be used and the			elimination code won't get rid of sfp.  It tracks			fp exactly at all times.   *: See CONDITIONAL_REGISTER_USAGE  *//* The stack backtrace structure is as follows:  fp points to here:  |  save code pointer  |      [fp]                      |  return link value  |      [fp, #-4]                      |  return sp value    |      [fp, #-8]                      |  return fp value    |      [fp, #-12]                     [|  saved r10 value    |]                     [|  saved r9 value     |]                     [|  saved r8 value     |]                     [|  saved r7 value     |]                     [|  saved r6 value     |]                     [|  saved r5 value     |]                     [|  saved r4 value     |]                     [|  saved r3 value     |]                     [|  saved r2 value     |]                     [|  saved r1 value     |]                     [|  saved r0 value     |]                     [|  saved f7 value     |]     three words                     [|  saved f6 value     |]     three words                     [|  saved f5 value     |]     three words                     [|  saved f4 value     |]     three words  r0-r3 are not normally saved in a C function.  *//* The number of hard registers is 16 ARM + 8 FPU + 1 CC + 1 SFP.  */#define FIRST_PSEUDO_REGISTER  27/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.  */#define FIXED_REGISTERS  \{                        \  0,0,0,0,0,0,0,0,	 \  0,0,1,1,0,1,0,1,	 \

⌨️ 快捷键说明

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