Back to index

cell-binutils  2.17cvs20070401
tc-mips.h
Go to the documentation of this file.
00001 /* tc-mips.h -- header file for tc-mips.c.
00002    Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
00003    2005, 2006 Free Software Foundation, Inc.
00004    Contributed by the OSF and Ralph Campbell.
00005    Written by Keith Knowles and Ralph Campbell, working independently.
00006    Modified for ECOFF support by Ian Lance Taylor of Cygnus Support.
00007 
00008    This file is part of GAS.
00009 
00010    GAS is free software; you can redistribute it and/or modify
00011    it under the terms of the GNU General Public License as published by
00012    the Free Software Foundation; either version 2, or (at your option)
00013    any later version.
00014 
00015    GAS is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU General Public License for more details.
00019 
00020    You should have received a copy of the GNU General Public License
00021    along with GAS; see the file COPYING.  If not, write to the Free
00022    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00023    02110-1301, USA.  */
00024 
00025 #ifndef TC_MIPS
00026 #define TC_MIPS
00027 
00028 struct frag;
00029 struct expressionS;
00030 
00031 /* Default to big endian.  */
00032 #ifndef TARGET_BYTES_BIG_ENDIAN
00033 #define TARGET_BYTES_BIG_ENDIAN           1
00034 #endif
00035 
00036 #define TARGET_ARCH bfd_arch_mips
00037 
00038 #define WORKING_DOT_WORD    1
00039 #define OLD_FLOAT_READS
00040 #define REPEAT_CONS_EXPRESSIONS
00041 #define RELOC_EXPANSION_POSSIBLE
00042 #define MAX_RELOC_EXPANSION 3
00043 #define LOCAL_LABELS_FB 1
00044 
00045 /* Maximum symbol offset that can be encoded in a BFD_RELOC_GPREL16
00046    relocation.  */
00047 #define MAX_GPREL_OFFSET (0x7FF0)
00048 
00049 #define md_relax_frag(segment, fragp, stretch) \
00050   mips_relax_frag(segment, fragp, stretch)
00051 extern int mips_relax_frag (asection *, struct frag *, long);
00052 
00053 #define md_undefined_symbol(name)  (0)
00054 #define md_operand(x)
00055 
00056 extern void mips_handle_align (struct frag *);
00057 #define HANDLE_ALIGN(fragp)  mips_handle_align (fragp)
00058 
00059 #define MAX_MEM_FOR_RS_ALIGN_CODE  (1 + 2)
00060 
00061 struct insn_label_list;
00062 #define TC_SEGMENT_INFO_TYPE struct insn_label_list *
00063 
00064 /* Tell assembler that we have an itbl_mips.h header file to include.  */
00065 #define HAVE_ITBL_CPU
00066 
00067 /* The endianness of the target format may change based on command
00068    line arguments.  */
00069 #define TARGET_FORMAT mips_target_format()
00070 extern const char *mips_target_format (void);
00071 
00072 /* MIPS PIC level.  */
00073 
00074 enum mips_pic_level
00075 {
00076   /* Do not generate PIC code.  */
00077   NO_PIC,
00078 
00079   /* Generate PIC code as in the SVR4 MIPS ABI.  */
00080   SVR4_PIC,
00081 
00082   /* VxWorks's PIC model.  */
00083   VXWORKS_PIC
00084 };
00085 
00086 extern enum mips_pic_level mips_pic;
00087 
00088 extern int tc_get_register (int frame);
00089 
00090 #define md_after_parse_args() mips_after_parse_args()
00091 extern void mips_after_parse_args (void);
00092 
00093 #define tc_init_after_args() mips_init_after_args()
00094 extern void mips_init_after_args (void);
00095 
00096 #define md_parse_long_option(arg) mips_parse_long_option (arg)
00097 extern int mips_parse_long_option (const char *);
00098 
00099 #define tc_frob_label(sym) mips_define_label (sym)
00100 extern void mips_define_label (symbolS *);
00101 
00102 #define tc_frob_file_before_adjust() mips_frob_file_before_adjust ()
00103 extern void mips_frob_file_before_adjust (void);
00104 
00105 #define tc_frob_file_before_fix() mips_frob_file ()
00106 extern void mips_frob_file (void);
00107 
00108 #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
00109 #define tc_frob_file_after_relocs mips_frob_file_after_relocs
00110 extern void mips_frob_file_after_relocs (void);
00111 #endif
00112 
00113 #define tc_fix_adjustable(fixp) mips_fix_adjustable (fixp)
00114 extern int mips_fix_adjustable (struct fix *);
00115 
00116 /* Values passed to md_apply_fix don't include symbol values.  */
00117 #define MD_APPLY_SYM_VALUE(FIX) 0
00118 
00119 /* Global syms must not be resolved, to support ELF shared libraries.  */
00120 #define EXTERN_FORCE_RELOC                \
00121   (OUTPUT_FLAVOR == bfd_target_elf_flavour)
00122 
00123 /* When generating NEWABI code, we may need to have to keep combined
00124    relocations which don't have symbols.  */
00125 #define TC_FORCE_RELOCATION(FIX) mips_force_relocation (FIX)
00126 extern int mips_force_relocation (struct fix *);
00127 
00128 #define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEG) \
00129   (! SEG_NORMAL (SEG) || mips_force_relocation (FIX))
00130 
00131 /* Register mask variables.  These are set by the MIPS assembly code
00132    and used by ECOFF and possibly other object file formats.  */
00133 extern unsigned long mips_gprmask;
00134 extern unsigned long mips_cprmask[4];
00135 
00136 #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
00137 
00138 #define elf_tc_final_processing mips_elf_final_processing
00139 extern void mips_elf_final_processing (void);
00140 
00141 #endif
00142 
00143 extern void md_mips_end (void);
00144 #define md_end()     md_mips_end()
00145 
00146 extern void mips_pop_insert (void);
00147 #define md_pop_insert()            mips_pop_insert()
00148 
00149 extern void mips_emit_delays (void);
00150 #define md_flush_pending_output mips_emit_delays
00151 
00152 extern void mips_enable_auto_align (void);
00153 #define md_elf_section_change_hook()      mips_enable_auto_align()
00154 
00155 enum dwarf2_format;
00156 extern enum dwarf2_format mips_dwarf2_format (void);
00157 #define DWARF2_FORMAT() mips_dwarf2_format ()
00158 
00159 extern int mips_dwarf2_addr_size (void);
00160 #define DWARF2_ADDR_SIZE(bfd) mips_dwarf2_addr_size ()
00161 
00162 #define TARGET_USE_CFIPOP 1
00163 
00164 #define tc_cfi_frame_initial_instructions mips_cfi_frame_initial_instructions
00165 extern void mips_cfi_frame_initial_instructions (void);
00166 
00167 #define tc_regname_to_dw2regnum tc_mips_regname_to_dw2regnum
00168 extern int tc_mips_regname_to_dw2regnum (char *regname);
00169 
00170 #define DWARF2_DEFAULT_RETURN_COLUMN 31
00171 #define DWARF2_CIE_DATA_ALIGNMENT (-4)
00172 
00173 #endif /* TC_MIPS */