1 /* This file is tc-sh.h
3 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
5 This file is part of GAS, the GNU Assembler.
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
24 /* This macro translates between an internal fix and an coff reloc type */
25 #define TC_COFF_FIX2RTYPE(fix) ((fix)->fx_r_type)
27 #define BFD_ARCH bfd_arch_sh
31 #define COFF_MAGIC (shl ? SH_ARCH_MAGIC_LITTLE : SH_ARCH_MAGIC_BIG)
33 /* Whether -relax was used. */
36 /* When relaxing, we need to generate relocations for alignment
38 #define HANDLE_ALIGN(frag) sh_handle_align (frag)
39 extern void sh_handle_align
PARAMS ((fragS
*));
41 /* We need to force out some relocations when relaxing. */
42 #define TC_FORCE_RELOCATION(fix) sh_force_relocation (fix)
43 extern int sh_force_relocation ();
45 /* We need to write out relocs which have not been completed. */
46 #define TC_COUNT_RELOC(fix) ((fix)->fx_addsy != NULL)
48 #define TC_RELOC_MANGLE(seg, fix, int, paddr) \
49 sh_coff_reloc_mangle ((seg), (fix), (int), (paddr))
50 extern void sh_coff_reloc_mangle ();
52 #define IGNORE_NONSTANDARD_ESCAPES
54 #define tc_coff_symbol_emit_hook(a) ; /* not used */
56 #define DO_NOT_STRIP 0
58 #define LISTING_HEADER (shl ? "Hitachi Super-H GAS Little Endian" : "Hitachi Super-H GAS Big Endian")
59 #define NEED_FX_R_TYPE 1
62 #define TC_KEEP_FX_OFFSET 1
64 #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag)
65 extern int tc_coff_sizemachdep
PARAMS ((fragS
*));
69 extern const struct relax_type md_relax_table
[];
70 #define TC_GENERIC_RELAX_TABLE md_relax_table
72 #define tc_frob_file sh_coff_frob_file
73 extern void sh_coff_frob_file
PARAMS (());
75 /* We use a special alignment function to insert the correct nop
77 extern int sh_do_align
PARAMS ((int, const char *));
78 #define md_do_align(n,fill,l) if (sh_do_align (n,fill)) goto l