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

📄 m32r.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions of target machine for GNU compiler, Mitsubishi M32R cpu.   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.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.  *//* Things to do:- longlong.h?*//* ??? Create elf.h and have svr4.h include it.  */#include "svr4.h"#undef SWITCH_TAKES_ARG#undef WORD_SWITCH_TAKES_ARG#undef HANDLE_SYSV_PRAGMA#undef SIZE_TYPE#undef PTRDIFF_TYPE#undef WCHAR_TYPE#undef WCHAR_TYPE_SIZE#undef ASM_FILE_START#undef ASM_OUTPUT_EXTERNAL_LIBCALL/* Print subsidiary information on the compiler version in use.  */#define TARGET_VERSION fprintf (stderr, " (m32r)")/* Switch  Recognition by gcc.c.  Add -G xx support */#undef SWITCH_TAKES_ARG#define SWITCH_TAKES_ARG(CHAR) \(DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')/* Names to predefine in the preprocessor for this target machine.  *//* __M32R__ is defined by the existing compiler so we use that.  */#define CPP_PREDEFINES "-Acpu(m32r) -Amachine(m32r) -D__M32R__"#define CC1_SPEC "%{G*}"/* Options to pass on to the assembler.  */#undef  ASM_SPEC#define ASM_SPEC "%{v}"#if 0 /* not supported yet */#undef  ASM_SPEC#define ASM_SPEC "%{v} %{mrelax:-relax}"#endif     #undef ASM_FINAL_SPEC#undef LINK_SPEC#if 0 /* not supported yet */#define LINK_SPEC "%{v} %{mrelax:-relax}"#else#define LINK_SPEC "%{v}"#endif#undef STARTFILE_SPEC#define STARTFILE_SPEC "%{!shared:crt0.o%s} crtinit.o%s"#undef ENDFILE_SPEC#define ENDFILE_SPEC "-lgloss crtfini.o%s"     #undef LIB_SPEC/* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;/* If non-zero, tell the linker to do relaxing.   We don't do anything with the option, other than recognize it.   LINK_SPEC handles passing -relax to the linker.   This can cause incorrect debugging information as line numbers may   turn out wrong.  This shouldn't be specified unless accompanied with -O2   [where the user expects debugging information to be less accurate].  */#define TARGET_RELAX_MASK 1/* For miscellaneous debugging purposes.  */#define TARGET_DEBUG_MASK 2#define TARGET_DEBUG (target_flags & TARGET_DEBUG_MASK)/* Align loops to 32 byte boundaries (cache line size).  *//* ??? This option is experimental and is not documented.  */#define TARGET_ALIGN_LOOPS_MASK 4#define TARGET_ALIGN_LOOPS (target_flags & TARGET_ALIGN_LOOPS_MASK)/* Use old compare/branch support (kept around for awhile for   comparison and backoff purposes).  *//* ??? This option is experimental and is not documented.   Eventually it will be deleted.  */#define TARGET_OLD_COMPARE_MASK 8#define TARGET_OLD_COMPARE (target_flags & TARGET_OLD_COMPARE_MASK)/* Target machine to compile for.  */#define TARGET_M32R 1/* 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 \{ \/*  { "relax",			TARGET_RELAX_MASK },			\    { "no-relax",		-TARGET_RELAX_MASK },*/			\    { "debug",			TARGET_DEBUG_MASK },			\    { "align-loops",		TARGET_ALIGN_LOOPS_MASK },		\    { "no-align-loops",		-TARGET_ALIGN_LOOPS_MASK },		\    { "old-compare",		TARGET_OLD_COMPARE_MASK },		\    { "no-old-compare",		-TARGET_OLD_COMPARE_MASK },		\    SUBTARGET_SWITCHES							\    { "", TARGET_DEFAULT }						\}#define TARGET_DEFAULT (0)#define SUBTARGET_SWITCHES/* 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 *m32r_model_string;extern char *m32r_sdata_string;#define TARGET_OPTIONS \{						\  { "model=",	&m32r_model_string	},	\  { "sdata=",	&m32r_sdata_string	},	\}/* Code Models   Code models are used to select between two choices of two separate   possibilities (address space size, call insn to use):   small: addresses use 24 bits, use bl to make calls   medium: addresses use 32 bits, use bl to make calls (*1)   large: addresses use 32 bits, use seth/add3/jl to make calls (*2)   The fourth is "addresses use 24 bits, use seth/add3/jl to make calls" but   using this one doesn't make much sense.   (*1) The linker may eventually be able to relax seth/add3 -> ld24.   (*2) The linker may eventually be able to relax seth/add3/jl -> bl.   Internally these are recorded as TARGET_ADDR{24,32} and   TARGET_CALL{26,32}.   The __model__ attribute can be used to select the code model to use when   accessing particular objects.  */enum m32r_model { M32R_MODEL_SMALL, M32R_MODEL_MEDIUM, M32R_MODEL_LARGE };extern enum m32r_model m32r_model;#define TARGET_MODEL_SMALL (m32r_model == M32R_MODEL_SMALL)#define TARGET_MODEL_MEDIUM (m32r_model == M32R_MODEL_MEDIUM)#define TARGET_MODEL_LARGE (m32r_model == M32R_MODEL_LARGE)#define TARGET_ADDR24 (m32r_model == M32R_MODEL_SMALL)#define TARGET_ADDR32 (! TARGET_ADDR24)#define TARGET_CALL26 (! TARGET_CALL32)#define TARGET_CALL32 (m32r_model == M32R_MODEL_LARGE)/* The default is the small model.  */#define M32R_MODEL_DEFAULT "small"/* Small Data Area   The SDA consists of sections .sdata, .sbss, and .scommon.   .scommon isn't a real section, symbols in it have their section index   set to SHN_M32R_SCOMMON, though support for it exists in the linker script.   Two switches control the SDA:   -G NNN        - specifies the maximum size of variable to go in the SDA   -msdata=foo   - specifies how such variables are handled        -msdata=none  - small data area is disabled        -msdata=sdata - small data goes in the SDA, special code isn't                        generated to use it, and special relocs aren't                        generated        -msdata=use   - small data goes in the SDA, special code is generated                        to use the SDA and special relocs are generated   The SDA is not multilib'd, it isn't necessary.   MULTILIB_EXTRA_OPTS is set in tmake_file to -msdata=sdata so multilib'd   libraries have small data in .sdata/SHN_M32R_SCOMMON so programs that use   -msdata=use will successfully link with them (references in header files   will cause the compiler to emit code that refers to library objects in   .data).  ??? There can be a problem if the user passes a -G value greater   than the default and a library object in a header file is that size.   The default is 8 so this should be rare - if it occurs the user   is required to rebuild the libraries or use a smaller value for -G.*//* Maximum size of variables that go in .sdata/.sbss.   The -msdata=foo switch also controls how small variables are handled.  */#define SDATA_DEFAULT_SIZE 8extern int g_switch_value;		/* value of the -G xx switch */extern int g_switch_set;		/* whether -G xx was passed.  */enum m32r_sdata { M32R_SDATA_NONE, M32R_SDATA_SDATA, M32R_SDATA_USE };extern enum m32r_sdata m32r_sdata;#define TARGET_SDATA_NONE (m32r_sdata == M32R_SDATA_NONE)#define TARGET_SDATA_SDATA (m32r_sdata == M32R_SDATA_SDATA)#define TARGET_SDATA_USE (m32r_sdata == M32R_SDATA_USE)/* Default is to disable the SDA   [for upward compatibility with previous toolchains].  */#define M32R_SDATA_DEFAULT "none"/* Define this macro as a C expression for the initializer of an array of   strings to tell the driver program which options are defaults for this   target and thus do not need to be handled specially when using   `MULTILIB_OPTIONS'.  */#define MULTILIB_DEFAULTS { "mmodel=small", "m32r" }/* 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.   Don't use this macro to turn on various extra optimizations for   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */#define OVERRIDE_OPTIONS \do {				\  /* These need to be done at start up.  It's convenient to do them here.  */ \  m32r_init ();			\} while (0)/* Define this macro if debugging can be performed even without a   frame pointer.  If this macro is defined, GNU CC will turn on the   `-fomit-frame-pointer' option whenever `-O' is specified.  */#define CAN_DEBUG_WITHOUT_FP/* 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 1/* Define this if most significant byte of a word is the lowest numbered.  */#define BYTES_BIG_ENDIAN 1/* Define this if most significant word of a multiword number is the lowest   numbered.  */#define WORDS_BIG_ENDIAN 1/* Define this macro if WORDS_BIG_ENDIAN is not constant.  This must   be a constant value with the same meaning as WORDS_BIG_ENDIAN,   which will be used only when compiling libgcc2.c.  Typically the   value will be set based on preprocessor defines.  *//*#define LIBGCC2_WORDS_BIG_ENDIAN 1*//* 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/* Width of a word, in units (bytes).  */#define UNITS_PER_WORD 4/* 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.  */#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \if (GET_MODE_CLASS (MODE) == MODE_INT		\    && GET_MODE_SIZE (MODE) < UNITS_PER_WORD)	\{						\  (MODE) = SImode;				\}/* Define this macro if the promotion described by `PROMOTE_MODE'   should also be done for outgoing function arguments.  *//*#define PROMOTE_FUNCTION_ARGS*//* Likewise, if the function return value is promoted.   If defined, FUNCTION_VALUE must perform the same promotions done by   PROMOTE_MODE.  *//*#define PROMOTE_FUNCTION_RETURN*//* 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

⌨️ 快捷键说明

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