2002-11-30 Nathanael Nerode <neroden@gcc.gnu.org>
[deliverable/binutils-gdb.git] / gas / config / tc-mcore.h
CommitLineData
252b5132
RH
1/* This file is tc-mcore.h
2
a161fe53 3 Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
252b5132
RH
4
5 This file is part of GAS, the GNU Assembler.
6
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)
10 any later version.
11
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.
16
17 You should have received a copy of the GNU General Public License
bec50466
NC
18 along with GAS; see the file COPYING. If not, write to the
19 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
d7f1f2b0 20 02111-1307, USA. */
252b5132
RH
21
22#ifndef TC_MCORE
23#define TC_MCORE 1
24
25#ifndef BFD_ASSEMBLER
26 #error MCORE support requires BFD_ASSEMBLER
27#endif
28
29#define TARGET_ARCH bfd_arch_mcore
829ce307
NC
30/* Used to initialise target_big_endian. */
31#define TARGET_BYTES_BIG_ENDIAN 0
252b5132
RH
32
33/* Don't write out relocs for pcrel stuff. */
34#define TC_COUNT_RELOC(x) (((x)->fx_addsy || (x)->fx_subsy) && \
35 (x)->fx_r_type < BFD_RELOC_MCORE_PCREL_IMM8BY4)
36
37#define IGNORE_NONSTANDARD_ESCAPES
38
39#define TC_RELOC_MANGLE(a,b,c) tc_reloc_mangle (a, b, c)
40
41/* Some pseudo-op semantic extensions. */
42#define PSEUDO_LCOMM_OPTIONAL_ALIGN
43
44#define LISTING_HEADER "M.CORE GAS Version 2.9.4"
45#define LISTING_LHS_CONT_LINES 4
46
47#define NEED_FX_R_TYPE 1
48#define COFF_FLAGS 1
49
50/* We want local label support. */
51#define LOCAL_LABELS_FB 1
a75214e5 52
252b5132 53#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep (frag)
a75214e5 54
252b5132
RH
55extern const struct relax_type md_relax_table[];
56#define TC_GENERIC_RELAX_TABLE md_relax_table
57#define md_end md_mcore_end
58
a75214e5 59/* Want the section information too... */
a161fe53 60#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
252b5132 61
252b5132
RH
62#ifdef OBJ_COFF
63
64#define TARGET_FORMAT (target_big_endian ? "pe-mcore-big" : "pe-mcore-little")
65
49309057
ILT
66struct mcore_tc_sy
67{
68 int sy_flags;
69};
70
71#define TC_SYMFIELD_TYPE struct mcore_tc_sy
252b5132 72
f11900d0 73# if defined TE_PE
a161fe53
AM
74# define TC_FORCE_RELOCATION(x) \
75 ((x)->fx_r_type == BFD_RELOC_RVA || S_FORCE_RELOC ((x)->fx_addsy))
f11900d0
NC
76# endif
77
252b5132
RH
78#endif /* OBJ_COFF */
79
252b5132
RH
80#ifdef OBJ_ELF
81
82#define TARGET_FORMAT (target_big_endian ? "elf32-mcore-big" : "elf32-mcore-little")
83
84#define ELF_TC_SPECIAL_SECTIONS \
85 { ".ctors", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \
86 { ".dtors", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \
87/* Other special sections not generated by the assembler: .reginfo,
88 .liblist, .conflict, .gptab, .got, .dynamic, .rel.dyn. */
89
a161fe53
AM
90/* No shared lib support, so we don't need to ensure externally
91 visible symbols can be overridden. */
92#define EXTERN_FORCE_RELOC 0
93
252b5132
RH
94/* When relaxing, we need to emit various relocs we otherwise wouldn't. */
95#define TC_FORCE_RELOCATION(fix) mcore_force_relocation (fix)
96extern int mcore_force_relocation PARAMS ((struct fix *));
97
a161fe53 98#define tc_fix_adjustable(FIX) mcore_fix_adjustable (FIX)
252b5132
RH
99extern boolean mcore_fix_adjustable PARAMS ((struct fix *));
100
a161fe53
AM
101/* Values passed to md_apply_fix3 don't include the symbol value. */
102#define MD_APPLY_SYM_VALUE(FIX) 0
103
252b5132
RH
104#endif /* OBJ_ELF */
105
106#ifndef TARGET_FORMAT
107# error No target format specified.
108#endif
109
252b5132 110#include "write.h" /* For definition of fixS */
a75214e5 111
252b5132
RH
112extern void md_begin PARAMS ((void));
113extern void md_assemble PARAMS ((char *));
114extern symbolS * md_undefined_symbol PARAMS ((char *));
115extern void md_mcore_end PARAMS ((void));
116extern char * md_atof PARAMS ((int, char *, int *));
117extern int md_parse_option PARAMS ((int, char *));
118extern void md_show_usage PARAMS ((FILE *));
a75214e5 119extern void md_create_short_jump
252b5132
RH
120 PARAMS ((char *, addressT, addressT, fragS *, symbolS *));
121extern void md_create_long_jump
122 PARAMS ((char *, addressT, addressT, fragS *, symbolS *));
123extern void md_convert_frag PARAMS ((bfd *, segT, fragS *));
252b5132
RH
124extern void md_operand PARAMS ((expressionS *));
125extern int md_estimate_size_before_relax PARAMS ((fragS *, segT));
126extern void md_number_to_chars PARAMS ((char *, valueT, int));
127extern valueT md_section_align PARAMS ((segT, valueT));
128extern long md_pcrel_from_section PARAMS ((fixS *, segT));
129extern arelent * tc_gen_reloc PARAMS ((asection *, fixS *));
130
131#endif /* TC_MCORE */
This page took 0.203123 seconds and 4 git commands to generate.