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

📄 dsp16xx.h

📁 gcc库的原代码,对编程有很大帮助.
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions of target machine for GNU compiler.  AT&T DSP1600.   Copyright (C) 1994, 1995 Free Software Foundation, Inc.   Contributed by Michael Collison (collison@world.std.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 1, 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.  */extern char *low_reg_names[];extern char *text_seg_name;extern char *rsect_text;extern char *data_seg_name;extern char *rsect_data;extern char *bss_seg_name;extern char *rsect_bss;extern char *const_seg_name;extern char *rsect_const;extern char *chip_name;extern char *save_chip_name;extern struct rtx_def *dsp16xx_compare_op0, *dsp16xx_compare_op1;extern struct rtx_def *(*dsp16xx_compare_gen)();extern struct rtx_def *gen_compare_reg();extern struct rtx_def *dsp16xx_addhf3_libcall;extern struct rtx_def *dsp16xx_subhf3_libcall;extern struct rtx_def *dsp16xx_mulhf3_libcall;extern struct rtx_def *dsp16xx_divhf3_libcall;extern struct rtx_def *dsp16xx_cmphf3_libcall;extern struct rtx_def *dsp16xx_fixhfhi2_libcall;extern struct rtx_def *dsp16xx_floathihf2_libcall;extern struct rtx_def *dsp16xx_neghf2_libcall;extern struct rtx_def *dsp16xx_umulhi3_libcall;extern struct rtx_def *dsp16xx_mulhi3_libcall;extern struct rtx_def *dsp16xx_udivqi3_libcall;extern struct rtx_def *dsp16xx_udivhi3_libcall;extern struct rtx_def *dsp16xx_divqi3_libcall;extern struct rtx_def *dsp16xx_divhi3_libcall;extern struct rtx_def *dsp16xx_modqi3_libcall;extern struct rtx_def *dsp16xx_modhi3_libcall;extern struct rtx_def *dsp16xx_umodqi3_libcall;extern struct rtx_def *dsp16xx_umodhi3_libcall;extern struct rtx_def *dsp16xx_ashrhi3_libcall;extern struct rtx_def *dsp16xx_ashlhi3_libcall;extern struct rtx_def *dsp16xx_lshrhi3_libcall;extern int hard_regno_mode_ok ();extern enum reg_class dsp16xx_reg_class_from_letter ();extern enum reg_class dsp16xx_limit_reload_class ();extern int hard_regno_nregs ();extern int regno_reg_class ();extern int move_operand ();extern int symbolic_address_p ();extern int Y_address ();extern int call_address_operand ();extern void notice_update_cc();extern void function_prologue ();extern void function_epilogue ();extern int  dsp1600_comparison_reverse ();extern void double_reg_from_memory ();extern void double_reg_to_memory ();extern void bss_section ();extern struct rtx_def *dsp16xx_function_arg ();extern void dsp16xx_function_arg_advance ();extern enum rtx_code next_cc_user_code ();extern enum rtx_code save_next_cc_user_code;extern struct rtx_def *gen_tst_reg ();extern char *output_block_move();/* RUN-TIME TARGET SPECIFICATION */#define DSP16XX   1/* Name of the AT&T assembler */#define ASM_PROG "as1600"/* Name of the AT&T linker */#define LD_PROG "ld1600"/* Define which switches take word arguments */#define WORD_SWITCH_TAKES_ARG(STR)              \  (!strcmp (STR, "ifile") ? 1 :                 \   0)#ifdef  CC1_SPEC#undef  CC1_SPEC#endif#define CC1_SPEC       ""/* Define this as a spec to call the AT&T assembler */#define CROSS_ASM_SPEC   "%{!S:as1600 %a %i\n }"/* Define this as a spec to call the AT&T linker */#define CROSS_LINK_SPEC  "%{!c:%{!M:%{!MM:%{!E:%{!S:ld1600 %l %X %{o*} %{m} \			%{r} %{s} %{t} %{u*} %{x}\			%{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:}\			%{L*} %D %o %{!nostdlib:-le1600 %L -le1600}\			%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\n }}}}}"/* Nothing complicated here, just link with libc.a under normal   circumstances */#define LIB_SPEC "-lc"/* Specify the startup file to link with. */#define STARTFILE_SPEC "%{mmap1:m1_crt0.o%s}  \%{mmap2:m2_crt0.o%s}                          \%{mmap3:m3_crt0.o%s}                          \%{mmap4:m4_crt0.o%s}                          \%{!mmap*: %{!ifile*: m4_crt0.o%s} %{ifile*:     \%eA -ifile option requires a -map option}}"/* Specify the end file to link with */#define ENDFILE_SPEC "%{mmap1:m1_crtn.o%s}  \%{mmap2:m2_crtn.o%s}                          \%{mmap3:m3_crtn.o%s}                          \%{mmap4:m4_crtn.o%s}                          \%{!mmap*: %{!ifile*: m4_crtn.o%s} %{ifile*:     \%eA -ifile option requires a -map option}}"/* Tell gcc where to look for the startfile */#define STANDARD_STARTFILE_PREFIX   "/d1600/lib"/* Tell gcc where to look for it's executables */#define STANDARD_EXEC_PREFIX  "/d1600/bin"/* Command line options to the AT&T assembler */#define ASM_SPEC  "%{V} %{v:%{!V:-V}} %{g*:-g}"/* Command line options for the AT&T linker */#define LINK_SPEC "%{V} %{v:%{!V:-V}} %{minit:-i}  \%{!ifile*:%{mmap1:-ifile m1_deflt.if%s}         \          %{mmap2:-ifile m2_deflt.if%s}         \          %{mmap3:-ifile m3_deflt.if%s}         \          %{mmap4:-ifile m4_deflt.if%s}         \          %{!mmap*:-ifile m4_deflt.if%s}}       \%{ifile*} %{!r:-a}"/* Names to predefine in the preprocessor for this target machine.  */#ifdef __MSDOS__#define CPP_PREDEFINES "-Ddsp1600 -DDSP1600 -DMSDOS"#else#define CPP_PREDEFINES "-Ddsp1600 -DDSP1600 -Ddsp1610 -DDSP1610"#endif/* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;/* Macros used in the machine description to test the flags.  */#define MASK_REGPARM         0x00000001    /* Pass parameters in registers */#define MASK_NEAR_CALL       0x00000002    /* The call is on the same 4k page */#define MASK_NEAR_JUMP       0x00000004    /* The jump is on the same 4k page */#define MASK_BMU             0x00000008    /* Use the 'bmu' shift instructions */#define MASK_OPTIMIZE_MEMORY 0x00000010    /* Optimize to conserve memory */#define MASK_OPTIMIZE_SPEED  0x00000020    /* Optimize for speed */#define MASK_MAP1            0x00000040    /* Link with map1 */#define MASK_MAP2            0x00000080    /* Link with map2 */#define MASK_MAP3            0x00000100    /* Link with map3 */#define MASK_MAP4            0x00000200    /* Link with map4 */#define MASK_YBASE_HIGH      0x00000400    /* The ybase register window starts high */#define MASK_INIT	     0x00000800    /* Have the linker generate tables to					      initialize data at startup */#define MASK_INLINE_MULT     0x00001000    /* Inline 32 bit multiplies */#define MASK_RESERVE_YBASE   0x00002000    /* Reserved the ybase registers *//* Compile passing first two args in regs 0 and 1.   This exists only to test compiler features that will   be needed for RISC chips.  It is not usable   and is not intended to be usable on this cpu.  */#define TARGET_REGPARM   (target_flags & MASK_REGPARM)/* The call is on the same 4k page, so instead of loading   the 'pt' register and branching, we can branch directly */#define TARGET_NEAR_CALL (target_flags & MASK_NEAR_CALL)/* The jump is on the same 4k page, so instead of loading   the 'pt' register and branching, we can branch directly */#define TARGET_NEAR_JUMP (target_flags & MASK_NEAR_JUMP)/* Generate shift instructions to use the 1610 Bit Manipulation   Unit. */#define TARGET_BMU (target_flags & MASK_BMU)/* Optimize to conserve memory */#define TARGET_OPTIMIZE_MEMORY (target_flags & MASK_OPTIMIZE_MEMORY)/* Optimize for maximum speed */#define TARGET_OPTIMIZE_SPEED   (target_flags & MASK_OPTIMIZE_SPEED)#define TARGET_YBASE_HIGH (target_flags & MASK_YBASE_HIGH)/* Direct the linker to output extra info for initialized data */#define TARGET_MASK_INIT (target_flags & MASK_INIT)#define TARGET_INLINE_MULT (target_flags & MASK_INLINE_MULT)/* Reserve the ybase registers *(0) - *(31) */#define TARGET_RESERVE_YBASE (target_flags & MASK_RESERVE_YBASE)/* 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                        \  {				               \    { "regparm",       MASK_REGPARM},	       \    { "no-regparm",   -MASK_REGPARM},	       \    { "no-near-call", -MASK_NEAR_CALL},        \    { "near-jump",     MASK_NEAR_JUMP},        \    { "no-near-jump", -MASK_NEAR_JUMP},        \    { "bmu",           MASK_BMU},              \    { "no-bmu",       -MASK_BMU},              \    { "Om",            MASK_OPTIMIZE_MEMORY},  \    { "Os",            MASK_OPTIMIZE_SPEED},   \    { "map1",          MASK_MAP1},             \    { "map2",          MASK_MAP2},             \    { "map3",          MASK_MAP3},             \    { "map4",          MASK_MAP4},             \    { "ybase-high",    MASK_YBASE_HIGH},       \    { "init",          MASK_INIT},             \    { "inline-mult",   MASK_INLINE_MULT},      \    { "reserve-ybase", MASK_RESERVE_YBASE},    \    { "",              TARGET_DEFAULT}         \  }/* Default target_flags if no switches are specified */#ifndef TARGET_DEFAULT#define TARGET_DEFAULT  MASK_OPTIMIZE_MEMORY|MASK_REGPARM|MASK_YBASE_HIGH#endif/* 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 } }  */#define TARGET_OPTIONS						\{								\  { "text=",	&text_seg_name	},				\  { "data=",	&data_seg_name	},				\  { "bss=",	&bss_seg_name	},				\  { "const=",   &const_seg_name },                              \  { "chip=",    &chip_name      }                               \}/* 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. */#define OVERRIDE_OPTIONS override_options ()#define OPTIMIZATION_OPTIONS(LEVEL)                   \{                                                     \    flag_gnu_linker             = FALSE;              \                                                      \    if (LEVEL)                                        \    {                                                 \	flag_omit_frame_pointer = TRUE;               \	flag_thread_jumps       = TRUE;               \    }                                                 \                                                      \    if (LEVEL >= 2)                                   \    {                                                 \	flag_strength_reduce         = TRUE;          \	flag_cse_follow_jumps        = TRUE;          \	flag_cse_skip_blocks         = TRUE;          \	flag_expensive_optimizations = TRUE;          \	flag_rerun_cse_after_loop    = TRUE;          \    }                                                 \                                                      \    if (LEVEL >= 3)                                   \    {                                                 \       flag_inline_functions = 1;                     \    }                                                 \}/* STORAGE LAYOUT *//* 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. */#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.   We define big-endian, but since the 1600 series cannot address bytes   it does not matter. */#define BYTES_BIG_ENDIAN 1

⌨️ 快捷键说明

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