]>
Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | /* This file is tc-mcore.h |
2 | ||
3 | Copyright (C) 1999 Free Software Foundation, Inc. | |
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 | |
18 | along with GAS; see the file COPYING. If not, write to | |
19 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
20 | ||
21 | #ifndef TC_MCORE | |
22 | #define TC_MCORE 1 | |
23 | ||
24 | #ifndef BFD_ASSEMBLER | |
25 | #error MCORE support requires BFD_ASSEMBLER | |
26 | #endif | |
27 | ||
28 | #define TARGET_ARCH bfd_arch_mcore | |
29 | #define TARGET_BYTES_BIG_ENDIAN 1 | |
30 | ||
31 | /* Don't write out relocs for pcrel stuff. */ | |
32 | #define TC_COUNT_RELOC(x) (((x)->fx_addsy || (x)->fx_subsy) && \ | |
33 | (x)->fx_r_type < BFD_RELOC_MCORE_PCREL_IMM8BY4) | |
34 | ||
35 | #define IGNORE_NONSTANDARD_ESCAPES | |
36 | ||
37 | #define TC_RELOC_MANGLE(a,b,c) tc_reloc_mangle (a, b, c) | |
38 | ||
39 | /* Some pseudo-op semantic extensions. */ | |
40 | #define PSEUDO_LCOMM_OPTIONAL_ALIGN | |
41 | ||
42 | #define LISTING_HEADER "M.CORE GAS Version 2.9.4" | |
43 | #define LISTING_LHS_CONT_LINES 4 | |
44 | ||
45 | #define NEED_FX_R_TYPE 1 | |
46 | #define COFF_FLAGS 1 | |
47 | ||
48 | /* We want local label support. */ | |
49 | #define LOCAL_LABELS_FB 1 | |
50 | ||
51 | #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep (frag) | |
52 | ||
53 | extern const struct relax_type md_relax_table[]; | |
54 | #define TC_GENERIC_RELAX_TABLE md_relax_table | |
55 | #define md_end md_mcore_end | |
56 | ||
57 | /* Want the section information too... */ | |
58 | #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC) | |
59 | ||
60 | #define MD_APPLY_FIX3 /* We want the segment as well. */ | |
61 | ||
62 | ||
63 | ||
64 | #ifdef OBJ_COFF | |
65 | ||
66 | #define TARGET_FORMAT (target_big_endian ? "pe-mcore-big" : "pe-mcore-little") | |
67 | ||
49309057 ILT |
68 | struct mcore_tc_sy |
69 | { | |
70 | int sy_flags; | |
71 | }; | |
72 | ||
73 | #define TC_SYMFIELD_TYPE struct mcore_tc_sy | |
252b5132 RH |
74 | |
75 | #endif /* OBJ_COFF */ | |
76 | ||
77 | ||
78 | #ifdef OBJ_ELF | |
79 | ||
80 | #define TARGET_FORMAT (target_big_endian ? "elf32-mcore-big" : "elf32-mcore-little") | |
81 | ||
82 | #define ELF_TC_SPECIAL_SECTIONS \ | |
83 | { ".ctors", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \ | |
84 | { ".dtors", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \ | |
85 | /* Other special sections not generated by the assembler: .reginfo, | |
86 | .liblist, .conflict, .gptab, .got, .dynamic, .rel.dyn. */ | |
87 | ||
88 | /* When relaxing, we need to emit various relocs we otherwise wouldn't. */ | |
89 | #define TC_FORCE_RELOCATION(fix) mcore_force_relocation (fix) | |
90 | extern int mcore_force_relocation PARAMS ((struct fix *)); | |
91 | ||
92 | #define obj_fix_adjustable(fixP) mcore_fix_adjustable (fixP) | |
93 | extern boolean mcore_fix_adjustable PARAMS ((struct fix *)); | |
94 | ||
95 | #endif /* OBJ_ELF */ | |
96 | ||
97 | #ifndef TARGET_FORMAT | |
98 | # error No target format specified. | |
99 | #endif | |
100 | ||
252b5132 RH |
101 | #include "write.h" /* For definition of fixS */ |
102 | ||
103 | extern void md_begin PARAMS ((void)); | |
104 | extern void md_assemble PARAMS ((char *)); | |
105 | extern symbolS * md_undefined_symbol PARAMS ((char *)); | |
106 | extern void md_mcore_end PARAMS ((void)); | |
107 | extern char * md_atof PARAMS ((int, char *, int *)); | |
108 | extern int md_parse_option PARAMS ((int, char *)); | |
109 | extern void md_show_usage PARAMS ((FILE *)); | |
110 | extern void md_create_short_jump | |
111 | PARAMS ((char *, addressT, addressT, fragS *, symbolS *)); | |
112 | extern void md_create_long_jump | |
113 | PARAMS ((char *, addressT, addressT, fragS *, symbolS *)); | |
114 | extern void md_convert_frag PARAMS ((bfd *, segT, fragS *)); | |
115 | extern int md_apply_fix3 PARAMS ((fixS *, valueT *, segT)); | |
116 | extern void md_operand PARAMS ((expressionS *)); | |
117 | extern int md_estimate_size_before_relax PARAMS ((fragS *, segT)); | |
118 | extern void md_number_to_chars PARAMS ((char *, valueT, int)); | |
119 | extern valueT md_section_align PARAMS ((segT, valueT)); | |
120 | extern long md_pcrel_from_section PARAMS ((fixS *, segT)); | |
121 | extern arelent * tc_gen_reloc PARAMS ((asection *, fixS *)); | |
122 | ||
123 | #endif /* TC_MCORE */ |