1 /* This file is tc-mcore.h
3 Copyright 1999, 2000, 2001, 2002, 2003, 2005
4 Free Software Foundation, Inc.
6 This file is part of GAS, the GNU Assembler.
8 GAS is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 GAS is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GAS; see the file COPYING. If not, write to the
20 Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
27 #error MCORE support requires BFD_ASSEMBLER
30 #define TARGET_ARCH bfd_arch_mcore
31 /* Used to initialise target_big_endian. */
32 #define TARGET_BYTES_BIG_ENDIAN 0
34 /* Don't write out relocs for pcrel stuff. */
35 #define TC_COUNT_RELOC(x) (((x)->fx_addsy || (x)->fx_subsy) && \
36 (x)->fx_r_type < BFD_RELOC_MCORE_PCREL_IMM8BY4)
38 #define IGNORE_NONSTANDARD_ESCAPES
40 #define TC_RELOC_MANGLE(a,b,c) tc_reloc_mangle (a, b, c)
42 /* Some pseudo-op semantic extensions. */
43 #define PSEUDO_LCOMM_OPTIONAL_ALIGN
45 #define LISTING_HEADER "M.CORE GAS Version 2.9.4"
46 #define LISTING_LHS_CONT_LINES 4
48 #define NEED_FX_R_TYPE 1
51 /* We want local label support. */
52 #define LOCAL_LABELS_FB 1
54 #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep (frag)
55 int tc_coff_sizemachdep (struct frag
*);
57 extern const struct relax_type md_relax_table
[];
58 #define TC_GENERIC_RELAX_TABLE md_relax_table
59 #define md_end md_mcore_end
61 /* Want the section information too... */
62 #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
66 #define TARGET_FORMAT (target_big_endian ? "pe-mcore-big" : "pe-mcore-little")
73 #define TC_SYMFIELD_TYPE struct mcore_tc_sy
76 # define TC_FORCE_RELOCATION(x) \
77 ((x)->fx_r_type == BFD_RELOC_RVA || generic_force_reloc (x))
84 #define TARGET_FORMAT (target_big_endian ? "elf32-mcore-big" : "elf32-mcore-little")
86 /* No shared lib support, so we don't need to ensure externally
87 visible symbols can be overridden. */
88 #define EXTERN_FORCE_RELOC 0
90 /* When relaxing, we need to emit various relocs we otherwise wouldn't. */
91 #define TC_FORCE_RELOCATION(fix) mcore_force_relocation (fix)
93 #define tc_fix_adjustable(FIX) mcore_fix_adjustable (FIX)
95 /* Values passed to md_apply_fix3 don't include the symbol value. */
96 #define MD_APPLY_SYM_VALUE(FIX) 0
100 #ifndef TARGET_FORMAT
101 # error No target format specified.
104 #include "write.h" /* For definition of fixS */
106 extern void md_mcore_end (void);
107 extern long md_pcrel_from_section (fixS
*, segT
);
108 extern arelent
* tc_gen_reloc (asection
*, fixS
*);
109 extern int mcore_force_relocation (fixS
*);
110 extern bfd_boolean
mcore_fix_adjustable (fixS
*);
112 #endif /* TC_MCORE */