Back to index

cell-binutils  2.17cvs20070401
tc-m32r.h
Go to the documentation of this file.
00001 /* tc-m32r.h -- Header file for tc-m32r.c.
00002    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
00003    2007 Free Software Foundation, Inc.
00004 
00005    This file is part of GAS, the GNU Assembler.
00006 
00007    GAS is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2, or (at your option)
00010    any later version.
00011 
00012    GAS is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with GAS; see the file COPYING.  If not, write to
00019    the Free Software Foundation, 51 Franklin Street - Fifth Floor,
00020    Boston, MA 02110-1301, USA.  */
00021 
00022 #define TC_M32R
00023 
00024 #define LISTING_HEADER \
00025   (target_big_endian ? "M32R GAS" : "M32R GAS Little Endian")
00026 
00027 /* The target BFD architecture.  */
00028 #define TARGET_ARCH bfd_arch_m32r
00029 
00030 /* The endianness of the target format may change based on command
00031    line arguments.  */
00032 #define TARGET_FORMAT m32r_target_format()
00033 extern const char *m32r_target_format (void);
00034 
00035 /* Default to big endian.  */
00036 #ifndef TARGET_BYTES_BIG_ENDIAN
00037 #define TARGET_BYTES_BIG_ENDIAN 1
00038 #endif
00039 
00040 /* Call md_pcrel_from_section, not md_pcrel_from.  */
00041 long md_pcrel_from_section (struct fix *, segT);
00042 #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section(FIX, SEC)
00043 
00044 /* Permit temporary numeric labels.  */
00045 #define LOCAL_LABELS_FB 1
00046 
00047 #define DIFF_EXPR_OK        /* .-foo gets turned into PC relative relocs.  */
00048 
00049 /* We don't need to handle .word strangely.  */
00050 #define WORKING_DOT_WORD
00051 
00052 /* For 8 vs 16 vs 32 bit branch selection.  */
00053 extern const struct relax_type md_relax_table[];
00054 #define TC_GENERIC_RELAX_TABLE md_relax_table
00055 
00056 extern long m32r_relax_frag (segT, fragS *, long);
00057 #define md_relax_frag(segment, fragP, stretch) \
00058   m32r_relax_frag (segment, fragP, stretch)
00059 
00060 /* Account for nop if 32 bit insn falls on odd halfword boundary.  */
00061 #define TC_CGEN_MAX_RELAX(insn, len)      6
00062 
00063 /* Fill in rs_align_code fragments.  */
00064 extern void m32r_handle_align (fragS *);
00065 #define HANDLE_ALIGN(f)  m32r_handle_align (f)
00066 
00067 #define MAX_MEM_FOR_RS_ALIGN_CODE  (1 + 2 + 4)
00068 
00069 /* Values passed to md_apply_fix don't include the symbol value.  */
00070 #define MD_APPLY_SYM_VALUE(FIX) 0
00071 
00072 #define md_apply_fix gas_cgen_md_apply_fix
00073 
00074 #define tc_fix_adjustable(FIX) m32r_fix_adjustable (FIX)
00075 bfd_boolean m32r_fix_adjustable (struct fix *);
00076 
00077 /* After creating a fixup for an instruction operand, we need to check for
00078    HI16 relocs and queue them up for later sorting.  */
00079 #define md_cgen_record_fixup_exp m32r_cgen_record_fixup_exp
00080 
00081 #define TC_HANDLES_FX_DONE
00082 
00083 extern int pic_code;
00084 
00085 extern bfd_boolean m32r_fix_adjustable (struct fix *);
00086 
00087 /* This arranges for gas/write.c to not apply a relocation if
00088    obj_fix_adjustable() says it is not adjustable.  */
00089 #define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
00090 
00091 #define tc_frob_file_before_fix() m32r_frob_file ()
00092 extern void m32r_frob_file (void);
00093 
00094 /* No shared lib support, so we don't need to ensure externally
00095    visible symbols can be overridden.
00096 #define EXTERN_FORCE_RELOC 0 */
00097 
00098 /* When relaxing, we need to emit various relocs we otherwise wouldn't.  */
00099 #define TC_FORCE_RELOCATION(fix) m32r_force_relocation (fix)
00100 extern int m32r_force_relocation (struct fix *);
00101 
00102 /* Ensure insns at labels are aligned to 32 bit boundaries.  */
00103 int m32r_fill_insn (int);
00104 #define md_after_pass_hook()       m32r_fill_insn (1)
00105 #define TC_START_LABEL(ch, ptr)    (ch == ':' && m32r_fill_insn (0))
00106 
00107 #define md_cleanup                 m32r_elf_section_change_hook
00108 #define md_elf_section_change_hook m32r_elf_section_change_hook
00109 extern void m32r_elf_section_change_hook (void);
00110 
00111 #define md_flush_pending_output()       m32r_flush_pending_output ()
00112 extern void m32r_flush_pending_output (void);
00113                                                                                   
00114 #define elf_tc_final_processing    m32r_elf_final_processing
00115 extern void m32r_elf_final_processing (void);
00116 
00117 #define md_parse_name(name, exprP, mode, nextcharP) \
00118   m32r_parse_name ((name), (exprP), (mode), (nextcharP))
00119 extern int m32r_parse_name (char const *, expressionS *, enum expr_mode, char *);
00120 
00121 /* This is used to construct expressions out of @GOTOFF, @PLT and @GOT
00122    symbols.  The relocation type is stored in X_md.  */
00123 #define O_PIC_reloc O_md1
00124 
00125 #define TC_CGEN_PARSE_FIX_EXP(opinfo, exp) \
00126   m32r_cgen_parse_fix_exp(opinfo, exp)
00127 extern int m32r_cgen_parse_fix_exp (int, expressionS *);