]>
Commit | Line | Data |
---|---|---|
d172d4ba NC |
1 | /* tc-dlx.h -- Assemble for the DLX |
2 | Copyright 2002 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GAS, the GNU Assembler. | |
5 | ||
6 | GAS is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
11 | GAS is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GAS; see the file COPYING. If not, write to the Free | |
18 | Software Foundation, 59 Temple Place - Suite 330, Boston, MA | |
19 | 02111-1307, USA. */ | |
20 | ||
21 | /* Initially created by Kuang Hwa Lin, 3/20/2002. */ | |
22 | ||
23 | #include "write.h" /* For the definition of fixS. */ | |
24 | ||
25 | #define TC_DLX | |
26 | ||
27 | #ifndef BFD_ASSEMBLER | |
28 | #error DLX support requires BFD_ASSEMBLER | |
29 | #endif | |
30 | ||
31 | #ifndef __BFD_H_SEEN__ | |
32 | #include "bfd.h" | |
33 | #endif | |
34 | ||
35 | /* The target BFD architecture. */ | |
36 | #define TARGET_ARCH bfd_arch_dlx | |
37 | #define TARGET_FORMAT "elf32-dlx" | |
38 | #define TARGET_BYTES_BIG_ENDIAN 1 | |
39 | ||
40 | #define WORKING_DOT_WORD | |
41 | ||
42 | #define LEX_DOLLAR 1 | |
43 | ||
44 | /* #define md_operand(x) */ | |
45 | extern void dlx_pop_insert PARAMS ((void)); | |
46 | extern int set_dlx_skip_hi16_flag PARAMS ((int)); | |
47 | ||
48 | #define md_pop_insert() dlx_pop_insert () | |
49 | ||
50 | #define md_convert_frag(b,s,f) as_fatal ("alpha convert_frag\n") | |
51 | #define md_convert_frag(b,s,f) as_fatal ("alpha convert_frag\n") | |
52 | #define md_estimate_size_before_relax(f,s) \ | |
53 | (as_fatal ("estimate_size_before_relax called"),1) | |
54 | ||
55 | #define tc_unrecognized_line(c) dlx_unrecognized_line (c) | |
56 | ||
57 | extern int dlx_unrecognized_line PARAMS ((int)); | |
58 | ||
59 | #define tc_headers_hook(a) ; /* not used */ | |
60 | #define tc_headers_hook(a) ; /* not used */ | |
61 | #define tc_crawl_symbol_chain(a) ; /* not used */ | |
62 | #define tc_coff_symbol_emit_hook(a) ; /* not used */ | |
63 | ||
64 | #define AOUT_MACHTYPE 101 | |
65 | #define TC_COFF_FIX2RTYPE(fix_ptr) tc_coff_fix2rtype (fix_ptr) | |
66 | #define BFD_ARCH bfd_arch_dlx | |
67 | #define COFF_MAGIC DLXMAGIC | |
68 | /* Should the reloc be output ? | |
69 | on the 29k, this is true only if there is a symbol attatched. | |
70 | on the h8, this is allways true, since no fixup is done | |
71 | on dlx, I have no idea!! but lets keep it here just for fun. | |
72 | */ | |
73 | #define TC_COUNT_RELOC(x) (x->fx_addsy) | |
74 | #define TC_CONS_RELOC BFD_RELOC_32_PCREL | |
75 | ||
76 | /* We need to force out some relocations when relaxing. */ | |
77 | #define TC_FORCE_RELOCATION(fix) md_dlx_force_relocation (fix) | |
78 | struct fix; | |
79 | extern int md_dlx_force_relocation PARAMS ((struct fix *)); | |
80 | ||
81 | #define obj_fix_adjustable(fixP) md_dlx_fix_adjustable(fixP) | |
82 | struct fix; | |
83 | extern boolean md_dlx_fix_adjustable PARAMS ((struct fix *)); | |
84 | ||
85 | /* This arranges for gas/write.c to not apply a relocation if | |
86 | obj_fix_adjustable() says it is not adjustable. */ | |
87 | #define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP) | |
88 | ||
89 | #define NEED_FX_R_TYPE | |
90 | ||
91 | /* Zero Based Segment?? sound very dangerous to me! */ | |
92 | #define ZERO_BASED_SEGMENTS | |
93 | ||
94 | /* Permit temporary numeric labels. */ | |
95 | #define LOCAL_LABELS_FB 1 | |
96 | #ifdef LOCAL_LABELS_DOLLAR | |
97 | #undef LOCAL_LABELS_DOLLAR | |
98 | #endif | |
99 | #define LOCAL_LABELS_DOLLAR 0 | |
100 | ||
101 | #define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */ | |
102 |