2002-06-08 Matt Thomas <matt@3am-software.com>
[binutils-gdb.git] / gas / config / tc-vax.h
1 /* tc-vax.h -- Header file for tc-vax.c.
2 Copyright 1987, 1991, 1992, 1993, 1995, 1996, 1997, 2000
3 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 the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22 #define TC_VAX 1
23
24 #define TARGET_BYTES_BIG_ENDIAN 0
25
26 #ifdef OBJ_AOUT
27 #ifdef TE_NetBSD
28 #define TARGET_FORMAT "a.out-vax-netbsd"
29 #endif
30 #ifndef TARGET_FORMAT
31 #define TARGET_FORMAT "a.out-vax-bsd"
32 #endif
33 #endif
34
35 #ifdef OBJ_VMS
36 #define TARGET_FORMAT "vms-vax"
37 #endif
38
39 #ifdef OBJ_ELF
40 #define TARGET_FORMAT "elf32-vax"
41 #endif
42
43 #define BFD_ARCH bfd_arch_vax /* for non-BFD_ASSEMBLER */
44 #define TARGET_ARCH bfd_arch_vax /* BFD_ASSEMBLER */
45
46 #ifdef BFD_ASSEMBLER
47 #define NO_RELOC BFD_RELOC_NONE
48 #else
49 #define NO_RELOC 0
50 #endif
51 #define NOP_OPCODE 0x01
52
53 #define tc_aout_pre_write_hook(x) {;} /* not used */
54 #define tc_crawl_symbol_chain(a) {;} /* not used */
55 #define md_operand(x)
56
57 long md_chars_to_number PARAMS ((unsigned char *, int));
58
59 extern const struct relax_type md_relax_table[];
60 #define TC_GENERIC_RELAX_TABLE md_relax_table
61
62 /* This expression evaluates to false if the relocation is for a local object
63 for which we still want to do the relocation at runtime. True if we
64 are willing to perform this relocation while building the .o file. If
65 the reloc is against an externally visible symbol, then the assembler
66 should never do the relocation. */
67
68 #ifdef BFD_ASSEMBLER
69 #define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
70 ((FIX)->fx_addsy == NULL \
71 || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
72 && ! S_IS_WEAK ((FIX)->fx_addsy) \
73 && S_IS_DEFINED ((FIX)->fx_addsy) \
74 && ! S_IS_COMMON ((FIX)->fx_addsy)))
75 #define TC_FIX_ADJUSTABLE(FIX) \
76 (!symbol_used_in_reloc_p ((FIX)) && tc_fix_adjustable ((FIX)))
77 #define tc_fix_adjustable(FIX) \
78 ((FIX)->fx_r_type != BFD_RELOC_VTABLE_INHERIT \
79 && (FIX)->fx_r_type != BFD_RELOC_32_PLT_PCREL \
80 && (FIX)->fx_r_type != BFD_RELOC_32_GOT_PCREL \
81 && (FIX)->fx_r_type != BFD_RELOC_VTABLE_ENTRY \
82 && ! S_IS_EXTERNAL ((FIX)->fx_addsy) \
83 && ! S_IS_WEAK ((FIX)->fx_addsy) \
84 && ((FIX)->fx_pcrel \
85 || ((FIX)->fx_subsy != NULL \
86 && (S_GET_SEGMENT ((FIX)->fx_subsy) \
87 == S_GET_SEGMENT ((FIX)->fx_addsy))) \
88 || S_IS_LOCAL ((FIX)->fx_addsy)))
89 #endif
90
91 /*
92 * Local Variables:
93 * comment-column: 0
94 * fill-column: 131
95 * End:
96 */