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

📄 sysv4.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 4 页
字号:
/* Target definitions for GNU compiler for PowerPC running System V.4   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003   Free Software Foundation, Inc.   Contributed by Cygnus Support.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.  *//* Header files should be C++ aware in general.  */#define NO_IMPLICIT_EXTERN_C/* Yes!  We are ELF.  */#define	TARGET_OBJECT_FORMAT OBJECT_ELF/* Default ABI to compile code for.  */#define DEFAULT_ABI rs6000_current_abi/* Default ABI to use.  */#define RS6000_ABI_NAME "sysv"/* Override rs6000.h definition.  */#undef	ASM_DEFAULT_SPEC#define	ASM_DEFAULT_SPEC "-mppc"/* Small data support types.  */enum rs6000_sdata_type {  SDATA_NONE,			/* No small data support.  */  SDATA_DATA,			/* Just put data in .sbss/.sdata, don't use relocs.  */  SDATA_SYSV,			/* Use r13 to point to .sdata/.sbss.  */  SDATA_EABI			/* Use r13 like above, r2 points to .sdata2/.sbss2.  */};extern enum rs6000_sdata_type rs6000_sdata;/* V.4/eabi switches.  */#define	MASK_NO_BITFIELD_TYPE	0x40000000	/* Set PCC_BITFIELD_TYPE_MATTERS to 0.  */#define	MASK_STRICT_ALIGN	0x20000000	/* Set STRICT_ALIGNMENT to 1.  */#define	MASK_RELOCATABLE	0x10000000	/* GOT pointers are PC relative.  */#define	MASK_EABI		0x08000000	/* Adhere to eabi, not System V spec.  */#define	MASK_LITTLE_ENDIAN	0x04000000	/* Target is little endian.  */#define	MASK_REGNAMES		0x02000000	/* Use alternate register names.  */#define	MASK_PROTOTYPE		0x01000000	/* Only prototyped fcns pass variable args.  */#define MASK_NO_BITFIELD_WORD	0x00800000	/* Bitfields cannot cross word boundaries */#define	TARGET_NO_BITFIELD_TYPE	(target_flags & MASK_NO_BITFIELD_TYPE)#define	TARGET_STRICT_ALIGN	(target_flags & MASK_STRICT_ALIGN)#define	TARGET_RELOCATABLE	(target_flags & MASK_RELOCATABLE)#define	TARGET_EABI		(target_flags & MASK_EABI)#define	TARGET_LITTLE_ENDIAN	(target_flags & MASK_LITTLE_ENDIAN)#define	TARGET_REGNAMES		(target_flags & MASK_REGNAMES)#define	TARGET_PROTOTYPE	(target_flags & MASK_PROTOTYPE)#define TARGET_NO_BITFIELD_WORD	(target_flags & MASK_NO_BITFIELD_WORD)#define	TARGET_TOC		((target_flags & MASK_64BIT)		\				 || ((target_flags & (MASK_RELOCATABLE	\						      | MASK_MINIMAL_TOC)) \				     && flag_pic > 1)			\				 || DEFAULT_ABI == ABI_AIX)#define	TARGET_BITFIELD_TYPE	(! TARGET_NO_BITFIELD_TYPE)#define	TARGET_BIG_ENDIAN	(! TARGET_LITTLE_ENDIAN)#define	TARGET_NO_PROTOTYPE	(! TARGET_PROTOTYPE)#define	TARGET_NO_TOC		(! TARGET_TOC)#define	TARGET_NO_EABI		(! TARGET_EABI)/* Strings provided by SUBTARGET_OPTIONS */extern const char *rs6000_abi_name;extern const char *rs6000_sdata_name;/* Override rs6000.h definition.  */#undef	SUBTARGET_OPTIONS#define	SUBTARGET_OPTIONS						\  { "call-",  &rs6000_abi_name, N_("Select ABI calling convention") },	\  { "sdata=", &rs6000_sdata_name, N_("Select method for sdata handling") }/* Max # of bytes for variables to automatically be put into the .sdata   or .sdata2 sections.  */extern int g_switch_value;		/* Value of the -G xx switch.  */extern int g_switch_set;		/* Whether -G xx was passed.  */#define SDATA_DEFAULT_SIZE 8/* Note, V.4 no longer uses a normal TOC, so make -mfull-toc, be just   the same as -mminimal-toc.  *//* Override rs6000.h definition.  */#undef	SUBTARGET_SWITCHES#define SUBTARGET_SWITCHES						\  { "bit-align",	-MASK_NO_BITFIELD_TYPE,				\    N_("Align to the base type of the bit-field") },			\  { "no-bit-align",	 MASK_NO_BITFIELD_TYPE,				\    N_("Don't align to the base type of the bit-field") },		\  { "strict-align",	 MASK_STRICT_ALIGN,				\    N_("Don't assume that unaligned accesses are handled by the system") }, \  { "no-strict-align",	-MASK_STRICT_ALIGN,				\    N_("Assume that unaligned accesses are handled by the system") },	\  { "relocatable",	 MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC, \    N_("Produce code relocatable at runtime") },			\  { "no-relocatable",	-MASK_RELOCATABLE,				\    N_("Don't produce code relocatable at runtime") },			\  { "relocatable-lib",	 MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC, \    N_("Produce code relocatable at runtime") },			\  { "no-relocatable-lib", -MASK_RELOCATABLE,				\    N_("Don't produce code relocatable at runtime") },			\  { "little-endian",	 MASK_LITTLE_ENDIAN,				\    N_("Produce little endian code") },					\  { "little",		 MASK_LITTLE_ENDIAN,				\    N_("Produce little endian code") },					\  { "big-endian",	-MASK_LITTLE_ENDIAN,				\    N_("Produce big endian code") },					\  { "big",		-MASK_LITTLE_ENDIAN,				\    N_("Produce big endian code") },					\  { "no-toc",		 0, N_("no description yet") },			\  { "toc",		 MASK_MINIMAL_TOC, N_("no description yet") },	\  { "full-toc",		 MASK_MINIMAL_TOC, N_("no description yet") },	\  { "prototype",	 MASK_PROTOTYPE, N_("no description yet") },	\  { "no-prototype",	-MASK_PROTOTYPE, N_("no description yet") },	\  { "no-traceback",	 0, N_("no description yet") },			\  { "eabi",		 MASK_EABI, N_("Use EABI") },			\  { "no-eabi",		-MASK_EABI, N_("Don't use EABI") },		\  { "bit-word",		-MASK_NO_BITFIELD_WORD, "" },			\  { "no-bit-word",	 MASK_NO_BITFIELD_WORD,				\    N_("Do not allow bit-fields to cross word boundaries") },		\  { "regnames",		  MASK_REGNAMES,				\    N_("Use alternate register names") },				\  { "no-regnames",	 -MASK_REGNAMES,				\    N_("Don't use alternate register names") },				\  { "sdata",		 0, N_("no description yet") },			\  { "no-sdata",		 0, N_("no description yet") },			\  { "sim",		 0,						\    N_("Link with libsim.a, libc.a and sim-crt0.o") },			\  { "ads",		 0,						\    N_("Link with libads.a, libc.a and crt0.o") },			\  { "yellowknife",	 0,						\    N_("Link with libyk.a, libc.a and crt0.o") },			\  { "mvme",		 0,						\    N_("Link with libmvme.a, libc.a and crt0.o") },			\  { "emb",		 0,						\    N_("Set the PPC_EMB bit in the ELF flags header") },		\  { "vxworks",		 0, N_("no description yet") },			\  { "windiss",           0, N_("Use the WindISS simulator") },          \  { "shlib",		 0, N_("no description yet") },			\  EXTRA_SUBTARGET_SWITCHES						\  { "newlib",		 0, N_("no description yet") },/* This is meant to be redefined in the host dependent files.  */#define EXTRA_SUBTARGET_SWITCHES/* 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.   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to   get control.  */#define SUBTARGET_OVERRIDE_OPTIONS					\do {									\  if (!g_switch_set)							\    g_switch_value = SDATA_DEFAULT_SIZE;				\									\  if (!strcmp (rs6000_abi_name, "sysv"))				\    rs6000_current_abi = ABI_V4;					\  else if (!strcmp (rs6000_abi_name, "sysv-noeabi"))			\    {									\      rs6000_current_abi = ABI_V4;					\      target_flags &= ~ MASK_EABI;					\    }									\  else if (!strcmp (rs6000_abi_name, "sysv-eabi")			\	   || !strcmp (rs6000_abi_name, "eabi"))			\    {									\      rs6000_current_abi = ABI_V4;					\      target_flags |= MASK_EABI;					\    }									\  else if (!strcmp (rs6000_abi_name, "aix"))				\    {									\      rs6000_current_abi = ABI_AIX_NODESC;				\      target_flags |= MASK_EABI;					\    }									\  else if (!strcmp (rs6000_abi_name, "aixdesc"))			\    rs6000_current_abi = ABI_AIX;					\  else if (!strcmp (rs6000_abi_name, "freebsd"))			\    rs6000_current_abi = ABI_V4;					\  else if (!strcmp (rs6000_abi_name, "linux"))				\    rs6000_current_abi = ABI_V4;					\  else if (!strcmp (rs6000_abi_name, "gnu"))				\    rs6000_current_abi = ABI_V4;					\  else if (!strcmp (rs6000_abi_name, "netbsd"))				\    rs6000_current_abi = ABI_V4;					\  else if (!strcmp (rs6000_abi_name, "i960-old"))			\    {									\      rs6000_current_abi = ABI_V4;					\      target_flags |= (MASK_LITTLE_ENDIAN | MASK_EABI			\		       | MASK_NO_BITFIELD_WORD);			\      target_flags &= ~MASK_STRICT_ALIGN;				\    }									\  else									\    {									\      rs6000_current_abi = ABI_V4;					\      error ("bad value for -mcall-%s", rs6000_abi_name);		\    }									\									\  if (rs6000_sdata_name)						\    {									\      if (!strcmp (rs6000_sdata_name, "none"))				\	rs6000_sdata = SDATA_NONE;					\      else if (!strcmp (rs6000_sdata_name, "data"))			\	rs6000_sdata = SDATA_DATA;					\      else if (!strcmp (rs6000_sdata_name, "default"))			\	rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV;		\      else if (!strcmp (rs6000_sdata_name, "sysv"))			\	rs6000_sdata = SDATA_SYSV;					\      else if (!strcmp (rs6000_sdata_name, "eabi"))			\	rs6000_sdata = SDATA_EABI;					\      else								\	error ("bad value for -msdata=%s", rs6000_sdata_name);		\    }									\  else if (DEFAULT_ABI == ABI_V4)					\    {									\      rs6000_sdata = SDATA_DATA;					\      rs6000_sdata_name = "data";					\    }									\  else									\    {									\      rs6000_sdata = SDATA_NONE;					\      rs6000_sdata_name = "none";					\    }									\									\  if (TARGET_RELOCATABLE &&						\      (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV))	\    {									\      rs6000_sdata = SDATA_DATA;					\      error ("-mrelocatable and -msdata=%s are incompatible",		\	     rs6000_sdata_name);					\    }									\									\  else if (flag_pic &&							\	   (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV))	\    {									\      rs6000_sdata = SDATA_DATA;					\      error ("-f%s and -msdata=%s are incompatible",			\	     (flag_pic > 1) ? "PIC" : "pic",				\	     rs6000_sdata_name);					\    }									\									\  if ((rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4)		\      || (rs6000_sdata == SDATA_EABI && !TARGET_EABI))			\    {									\      rs6000_sdata = SDATA_NONE;					\      error ("-msdata=%s and -mcall-%s are incompatible",		\	     rs6000_sdata_name, rs6000_abi_name);			\    }									\									\  targetm.have_srodata_section = rs6000_sdata == SDATA_EABI;		\									\  if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC)			\    {									\      target_flags |= MASK_MINIMAL_TOC;					\      error ("-mrelocatable and -mno-minimal-toc are incompatible");	\    }									\									\  if (TARGET_RELOCATABLE && rs6000_current_abi == ABI_AIX)		\    {									\      target_flags &= ~MASK_RELOCATABLE;				\      error ("-mrelocatable and -mcall-%s are incompatible",		\	     rs6000_abi_name);						\    }									\									\  if (flag_pic > 1 && rs6000_current_abi == ABI_AIX)			\    {									\      flag_pic = 0;							\      error ("-fPIC and -mcall-%s are incompatible",			\	     rs6000_abi_name);						\    }									\									\  if (rs6000_current_abi == ABI_AIX && TARGET_LITTLE_ENDIAN)		\    {									\      target_flags &= ~MASK_LITTLE_ENDIAN;				\      error ("-mcall-aixdesc must be big endian");			\    }									\									\  /* Treat -fPIC the same as -mrelocatable.  */				\  if (flag_pic > 1)							\    target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC; \									\  else if (TARGET_RELOCATABLE)						\    flag_pic = 2;							\									\} while (0)/* Override rs6000.h definition.  */#undef	TARGET_DEFAULT#define	TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)/* Override rs6000.h definition.  */#undef	PROCESSOR_DEFAULT#define	PROCESSOR_DEFAULT PROCESSOR_PPC750#define FIXED_R2 1/* System V.4 uses register 13 as a pointer to the small data area,   so it is not available to the normal user.  */#define FIXED_R13 1/* Size of the V.4 varargs area if needed.  *//* Override rs6000.h definition.  */#undef	RS6000_VARARGS_AREA#define RS6000_VARARGS_AREA ((cfun->machine->sysv_varargs_p) ? RS6000_VARARGS_SIZE : 0)/* Override default big endianism definitions in rs6000.h.  */#undef	BYTES_BIG_ENDIAN#undef	WORDS_BIG_ENDIAN#define	BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)#define	WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)/* Define this to set the endianness to use in libgcc2.c, which can   not depend on target_flags.  */#if !defined(__LITTLE_ENDIAN__) && !defined(__sun__)#define LIBGCC2_WORDS_BIG_ENDIAN 1#else#define LIBGCC2_WORDS_BIG_ENDIAN 0#endif/* Define cutoff for using external functions to save floating point.   Currently on V.4, always use inline stores.  */#define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 64)/* Put jump tables in read-only memory, rather than in .text.  */#define JUMP_TABLES_IN_TEXT_SECTION 0/* Prefix and suffix to use to saving floating point.  */#define	SAVE_FP_PREFIX "_savefpr_"#define SAVE_FP_SUFFIX "_l"/* Prefix and suffix to use to restoring floating point.  */#define	RESTORE_FP_PREFIX "_restfpr_"#define RESTORE_FP_SUFFIX "_l"/* Type used for ptrdiff_t, as a string used in a declaration.  */#define PTRDIFF_TYPE "int"/* Type used for wchar_t, as a string used in a declaration.  *//* Override svr4.h definition.  */#undef	WCHAR_TYPE#define WCHAR_TYPE "long int"/* Width of wchar_t in bits.  *//* Override svr4.h definition.  */#undef	WCHAR_TYPE_SIZE#define WCHAR_TYPE_SIZE 32/* Make int foo : 8 not cause structures to be aligned to an int boundary.  *//* Override elfos.h definition.  */#undef	PCC_BITFIELD_TYPE_MATTERS#define	PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)#undef	BITFIELD_NBYTES_LIMITED#define	BITFIELD_NBYTES_LIMITED (TARGET_NO_BITFIELD_WORD)/* Define this macro to be the value 1 if instructions will fail to

⌨️ 快捷键说明

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