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

📄 sh.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions of target machine for GNU compiler for Hitachi Super-H.   Copyright (C) 1993-1998 Free Software Foundation, Inc.   Contributed by Steve Chamberlain (sac@cygnus.com).   Improved by Jim Wilson (wilson@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.  */#define TARGET_VERSION \  fputs (" (Hitachi SH)", stderr);/* Unfortunately, insn-attrtab.c doesn't include insn-codes.h.  We can't  include it here, because hconfig.h is also included by gencodes.c .  */extern int code_for_indirect_jump_scratch;/* Generate SDB debugging information.  */#define SDB_DEBUGGING_INFO/* Output DBX (stabs) debugging information if doing -gstabs.  */#include "dbxcoff.h"#define SDB_DELIM ";"#define CPP_SPEC "%{ml:-D__LITTLE_ENDIAN__} \%{m1:-D__sh1__} \%{m2:-D__sh2__} \%{m3:-D__sh3__} \%{m3e:-D__SH3E__} \%{m4-single-only:-D__SH4_SINGLE_ONLY__} \%{m4-single:-D__SH4_SINGLE__} \%{m4:-D__SH4__} \%{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:-D__sh1__}}}}}}} \%{mhitachi:-D__HITACHI__}"#define CPP_PREDEFINES "-D__sh__ -Acpu(sh) -Amachine(sh)"#define ASM_SPEC  "%{ml:-little} %{mrelax:-relax}"#define LINK_SPEC "%{ml:-m shl} %{mrelax:-relax}"/* We can not debug without a frame pointer.  *//* #define CAN_DEBUG_WITHOUT_FP */#define CONDITIONAL_REGISTER_USAGE					\  if (! TARGET_SH4 || ! TARGET_FMOVD)					\    {									\      int regno;							\      for (regno = FIRST_XD_REG; regno <= LAST_XD_REG; regno++)		\	fixed_regs[regno] = call_used_regs[regno] = 1;			\      if (! TARGET_SH4)							\	{								\	  if (! TARGET_SH3E)						\	    {								\	      int regno;						\	      for (regno = FIRST_FP_REG; regno <= LAST_FP_REG; regno++)	\		fixed_regs[regno] = call_used_regs[regno] = 1;		\	      fixed_regs[FPUL_REG] = call_used_regs[FPUL_REG] = 1;	\	    }								\	}								\    }									\  /* Hitachi saves and restores mac registers on call.  */		\  if (TARGET_HITACHI)							\    {									\      call_used_regs[MACH_REG] = 0;					\      call_used_regs[MACL_REG] = 0;					\    }/* ??? Need to write documentation for all SH options and add it to the   invoke.texi file.  *//* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;#define ISIZE_BIT      	(1<<1)#define DALIGN_BIT     	(1<<6)#define SH1_BIT	       	(1<<8)#define SH2_BIT	       	(1<<9)#define SH3_BIT	       	(1<<10)#define SH3E_BIT	(1<<11)#define HARD_SH4_BIT	(1<<5)#define FPU_SINGLE_BIT	(1<<7)#define SH4_BIT	       	(1<<12)#define FMOVD_BIT	(1<<4)#define SPACE_BIT 	(1<<13)#define BIGTABLE_BIT  	(1<<14)#define RELAX_BIT	(1<<15)#define HITACHI_BIT     (1<<22)#define PADSTRUCT_BIT  (1<<28)#define LITTLE_ENDIAN_BIT (1<<29)#define IEEE_BIT (1<<30)/* Nonzero if we should dump out instruction size info.  */#define TARGET_DUMPISIZE  (target_flags & ISIZE_BIT)/* Nonzero to align doubles on 64 bit boundaries.  */#define TARGET_ALIGN_DOUBLE (target_flags & DALIGN_BIT)/* Nonzero if we should generate code using type 1 insns.  */#define TARGET_SH1 (target_flags & SH1_BIT)/* Nonzero if we should generate code using type 2 insns.  */#define TARGET_SH2 (target_flags & SH2_BIT)/* Nonzero if we should generate code using type 3 insns.  */#define TARGET_SH3 (target_flags & SH3_BIT)/* Nonzero if we should generate code using type 3E insns.  */#define TARGET_SH3E (target_flags & SH3E_BIT)/* Nonzero if the cache line size is 32. */#define TARGET_CACHE32 (target_flags & HARD_SH4_BIT)/* Nonzero if we schedule for a superscalar implementation. */#define TARGET_SUPERSCALAR (target_flags & HARD_SH4_BIT)/* Nonzero if the target has separate instruction and data caches.  */#define TARGET_HARWARD (target_flags & HARD_SH4_BIT)/* Nonzero if compiling for SH4 hardware (to be used for insn costs etc.)  */#define TARGET_HARD_SH4 (target_flags & HARD_SH4_BIT)/* Nonzero if the default precision of th FPU is single */#define TARGET_FPU_SINGLE (target_flags & FPU_SINGLE_BIT)/* Nonzero if we should generate code using type 4 insns.  */#define TARGET_SH4 (target_flags & SH4_BIT)/* Nonzero if we should generate fmovd.  */#define TARGET_FMOVD (target_flags & FMOVD_BIT)/* Nonzero if we respect NANs.  */#define TARGET_IEEE (target_flags & IEEE_BIT)/* Nonzero if we should generate smaller code rather than faster code.  */#define TARGET_SMALLCODE   (target_flags & SPACE_BIT)/* Nonzero to use long jump tables.  */#define TARGET_BIGTABLE     (target_flags & BIGTABLE_BIT)/* Nonzero to generate pseudo-ops needed by the assembler and linker   to do function call relaxing.  */#define TARGET_RELAX (target_flags & RELAX_BIT)/* Nonzero if using Hitachi's calling convention.  */#define TARGET_HITACHI 		(target_flags & HITACHI_BIT)/* Nonzero if padding structures to a multiple of 4 bytes.  This is   incompatible with Hitachi's compiler, and gives unusual structure layouts   which confuse programmers.   ??? This option is not useful, but is retained in case there are people   who are still relying on it.  It may be deleted in the future.  */#define TARGET_PADSTRUCT       (target_flags & PADSTRUCT_BIT)/* Nonzero if generating code for a little endian SH.  */#define TARGET_LITTLE_ENDIAN     (target_flags & LITTLE_ENDIAN_BIT)#define TARGET_SWITCHES  			\{ {"1",	        SH1_BIT},			\  {"2",	        SH2_BIT},			\  {"3",	        SH3_BIT|SH2_BIT},		\  {"3e",	SH3E_BIT|SH3_BIT|SH2_BIT|FPU_SINGLE_BIT},	\  {"4-single-only",	SH3E_BIT|SH3_BIT|SH2_BIT|SH3E_BIT|HARD_SH4_BIT|FPU_SINGLE_BIT},	\  {"4-single",	SH4_BIT|SH3E_BIT|SH3_BIT|SH2_BIT|HARD_SH4_BIT|FPU_SINGLE_BIT},\  {"4",	        SH4_BIT|SH3E_BIT|SH3_BIT|SH2_BIT|HARD_SH4_BIT},	\  {"b",		-LITTLE_ENDIAN_BIT},  		\  {"bigtable", 	BIGTABLE_BIT},			\  {"dalign",  	DALIGN_BIT},			\  {"fmovd",  	FMOVD_BIT},			\  {"hitachi",	HITACHI_BIT},			\  {"ieee",  	IEEE_BIT},			\  {"isize", 	ISIZE_BIT},			\  {"l",		LITTLE_ENDIAN_BIT},  		\  {"no-ieee",  	-IEEE_BIT},			\  {"padstruct", PADSTRUCT_BIT},    		\  {"relax",	RELAX_BIT},			\  {"space", 	SPACE_BIT},			\  SUBTARGET_SWITCHES                            \  {"",   	TARGET_DEFAULT} 		\}/* This are meant to be redefined in the host dependent files */#define SUBTARGET_SWITCHES#define TARGET_DEFAULT  (0)#define OPTIMIZATION_OPTIONS(LEVEL,SIZE)				\do {									\  if (LEVEL)								\    flag_omit_frame_pointer = -1;					\  if (LEVEL)								\    sh_flag_remove_dead_before_cse = 1;					\  if (SIZE)								\    target_flags |= SPACE_BIT;						\} while (0)#define ASSEMBLER_DIALECT assembler_dialectextern int assembler_dialect;#define OVERRIDE_OPTIONS 						\do {									\  sh_cpu = CPU_SH1;							\  assembler_dialect = 0;						\  if (TARGET_SH2)							\    sh_cpu = CPU_SH2;							\  if (TARGET_SH3)							\    sh_cpu = CPU_SH3;							\  if (TARGET_SH3E)							\    sh_cpu = CPU_SH3E;							\  if (TARGET_SH4)							\    {									\      assembler_dialect = 1;						\      sh_cpu = CPU_SH4;							\    }									\  if (! TARGET_SH4 || ! TARGET_FMOVD)					\    {									\      /* Prevent usage of explicit register names for variables		\	 for registers not present / not addressable in the		\	 target architecture.  */					\      int regno;							\      for (regno = (TARGET_SH3E) ? 17 : 0; 				\	   regno <= 24; regno++)					\	fp_reg_names[regno][0] = 0;					\    }									\  if (flag_omit_frame_pointer < 0)					\   /* The debugging information is sufficient,				\      but gdb doesn't implement this yet */				\   if (0)								\    flag_omit_frame_pointer						\      = (PREFERRED_DEBUGGING_TYPE == DWARF_DEBUG			\	 || PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);			\   else									\    flag_omit_frame_pointer = 0;					\									\  /* Never run scheduling before reload, since that can			\     break global alloc, and generates slower code anyway due		\     to the pressure on R0.  */						\  flag_schedule_insns = 0;						\  sh_addr_diff_vec_mode = TARGET_BIGTABLE ? SImode : HImode;		\} while (0)/* Target machine storage layout.  *//* Define to use software floating point emulator for REAL_ARITHMETIC and   decimal <-> binary conversion.  */#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.  */#define BYTES_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0)/* Define this if most significant word of a multiword number is the lowest   numbered.  */#define WORDS_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0)/* Define this to set the endianness to use in libgcc2.c, which can   not depend on target_flags.  */#if defined(__LITTLE_ENDIAN__)#define LIBGCC2_WORDS_BIG_ENDIAN 0#else#define LIBGCC2_WORDS_BIG_ENDIAN 1#endif/* 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.   Note that this is not necessarily the width of data type `int';   if using 16-bit ints on a 68000, this would still be 32.   But on a machine with 16-bit registers, this would be 16.  */#define BITS_PER_WORD  32#define MAX_BITS_PER_WORD 32/* Width of a word, in units (bytes).  */#define UNITS_PER_WORD	4/* Width in bits of a pointer.   See also the macro `Pmode' defined below.  */#define POINTER_SIZE  32/* Allocation boundary (in *bits*) for storing arguments in argument list.  */#define PARM_BOUNDARY  	32/* Boundary (in *bits*) on which stack pointer should be aligned.  */#define STACK_BOUNDARY  BIGGEST_ALIGNMENT/* The log (base 2) of the cache line size, in bytes.  Processors prior to   SH2 have no actual cache, but they fetch code in chunks of 4 bytes.   The SH2/3 have 16 byte cache lines, and the SH4 has a 32 byte cache line */#define CACHE_LOG (TARGET_CACHE32 ? 5 : TARGET_SH2 ? 4 : 2)/* Allocation boundary (in *bits*) for the code of a function.   32 bit alignment is faster, because instructions are always fetched as a   pair from a longword boundary.  */#define FUNCTION_BOUNDARY  (TARGET_SMALLCODE ? 16 : (1 << CACHE_LOG) * 8)/* Alignment of field after `int : 0' in a structure.  */#define EMPTY_FIELD_BOUNDARY  32/* No data type wants to be aligned rounder than this.  */#define BIGGEST_ALIGNMENT  (TARGET_ALIGN_DOUBLE ? 64 : 32)/* The best alignment to use in cases where we have a choice.  */#define FASTEST_ALIGNMENT 32/* Make strings word-aligned so strcpy from constants will be faster.  */#define CONSTANT_ALIGNMENT(EXP, ALIGN)	\  ((TREE_CODE (EXP) == STRING_CST	\    && (ALIGN) < FASTEST_ALIGNMENT)	\    ? FASTEST_ALIGNMENT : (ALIGN))#ifndef MAX_OFILE_ALIGNMENT#define MAX_OFILE_ALIGNMENT 128#endif/* Make arrays of chars word-aligned for the same reasons.  */#define DATA_ALIGNMENT(TYPE, ALIGN)		\  (TREE_CODE (TYPE) == ARRAY_TYPE		\   && TYPE_MODE (TREE_TYPE (TYPE)) == QImode	\   && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))/* Number of bits which any structure or union's size must be a   multiple of.  Each structure or union's size is rounded up to a   multiple of this.  */#define STRUCTURE_SIZE_BOUNDARY (TARGET_PADSTRUCT ? 32 : 8)/* Set this nonzero if move instructions will actually fail to work   when given unaligned data.  */#define STRICT_ALIGNMENT 1/* If LABEL_AFTER_BARRIER demands an alignment, return its base 2 logarithm.  */

⌨️ 快捷键说明

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