Back to index

cell-binutils  2.17cvs20070401
tc-m32c.h
Go to the documentation of this file.
00001 /* tc-m32c.h -- Header file for tc-m32c.c.
00002    Copyright (C) 2004, 2005 Free Software Foundation, Inc.
00003 
00004    This file is part of GAS, the GNU Assembler.
00005 
00006    GAS is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2, or (at your option)
00009    any later version.
00010 
00011    GAS is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with GAS; see the file COPYING.  If not, write to
00018    the Free Software Foundation, 59 Temple Place - Suite 330,
00019    Boston, MA 02111-1307, USA. */
00020 
00021 #define TC_M32C
00022 
00023 #define LISTING_HEADER "M16C/M32C GAS "
00024 
00025 /* The target BFD architecture.  */
00026 #define TARGET_ARCH bfd_arch_m32c
00027 
00028 #define TARGET_FORMAT "elf32-m32c"
00029 
00030 #define TARGET_BYTES_BIG_ENDIAN 1
00031 
00032 #define md_end  m32c_md_end
00033 extern void m32c_md_end (void);
00034 
00035 #define md_start_line_hook m32c_start_line_hook
00036 extern void m32c_start_line_hook (void);
00037 
00038 /* call md_pcrel_from_section, not md_pcrel_from */
00039 long md_pcrel_from_section PARAMS ((struct fix *, segT));
00040 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
00041 
00042 /* Permit temporary numeric labels.  */
00043 #define LOCAL_LABELS_FB 1
00044 
00045 #define DIFF_EXPR_OK        /* .-foo gets turned into PC relative relocs */
00046 
00047 /* We don't need to handle .word strangely.  */
00048 #define WORKING_DOT_WORD
00049 
00050 #define md_apply_fix m32c_apply_fix
00051 extern void m32c_apply_fix PARAMS ((struct fix *, valueT *, segT));
00052 
00053 #define tc_fix_adjustable(fixP) m32c_fix_adjustable (fixP)
00054 extern bfd_boolean m32c_fix_adjustable PARAMS ((struct fix *));
00055 
00056 /* When relaxing, we need to emit various relocs we otherwise wouldn't.  */
00057 #define TC_FORCE_RELOCATION(fix) m32c_force_relocation (fix)
00058 extern int m32c_force_relocation PARAMS ((struct fix *));
00059 
00060 #define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
00061   m32c_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
00062 extern void m32c_cons_fix_new (fragS *, int, int, expressionS *);
00063 
00064 extern const struct relax_type md_relax_table[];
00065 #define TC_GENERIC_RELAX_TABLE md_relax_table
00066 
00067 extern void m32c_prepare_relax_scan PARAMS ((fragS *, offsetT *, relax_substateT state));
00068 #define md_prepare_relax_scan(FRAGP, ADDR, AIM, STATE, TYPE) \
00069        m32c_prepare_relax_scan(FRAGP, &AIM, STATE)
00070 
00071 /* Values passed to md_apply_fix don't include the symbol value.  */
00072 #define MD_APPLY_SYM_VALUE(FIX) 0
00073 
00074 /* Call md_pcrel_from_section(), not md_pcrel_from().  */
00075 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
00076 extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
00077 
00078 /* We need a special version of the TC_START_LABEL macro so that we
00079    allow the :Z, :S, :Q and :G suffixes to be
00080    parsed as such.  Note - in a HORRIBLE HACK, we make use of the
00081    knowledge that this marco is only ever evaluated in one place
00082    (read_a_source_file in read.c) where we can access the local
00083    variable 's' - the start of the symbol that was terminated by
00084    'character'.  Also we need to be able to change the contents of
00085    the local variable 'c' which is passed to this macro as 'character'.  */
00086 #define TC_START_LABEL(character, i_l_p)                \
00087   ((character) != ':' ? 0 : (character = m32c_is_colon_insn (s)) ? 0 : ((character = ':'), 1))
00088 extern char m32c_is_colon_insn PARAMS ((char *));