* readelf.c: Include elf/h8 for H8 series definitions.
[deliverable/binutils-gdb.git] / gas / config / tc-alpha.h
CommitLineData
252b5132 1/* This file is tc-alpha.h
f7e42eb4
NC
2 Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
3 Free Software Foundation, Inc.
252b5132
RH
4 Written by Ken Raeburn <raeburn@cygnus.com>.
5
6 This file is part of GAS, the GNU Assembler.
7
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)
11 any later version.
12
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.
17
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 Free
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21 02111-1307, USA. */
22
23#define TC_ALPHA
24
25#define TARGET_BYTES_BIG_ENDIAN 0
26
27#define WORKING_DOT_WORD
28
29#define TARGET_ARCH bfd_arch_alpha
30
31#define TARGET_FORMAT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
32 ? "ecoff-littlealpha" \
33 : OUTPUT_FLAVOR == bfd_target_elf_flavour \
34 ? "elf64-alpha" \
35 : OUTPUT_FLAVOR == bfd_target_evax_flavour \
36 ? "vms-alpha" \
37 : "unknown-format")
38
39#define NEED_LITERAL_POOL
40#define TC_HANDLES_FX_DONE
41#define REPEAT_CONS_EXPRESSIONS
42
43extern int alpha_force_relocation PARAMS ((struct fix *));
44extern int alpha_fix_adjustable PARAMS ((struct fix *));
45
46extern unsigned long alpha_gprmask, alpha_fprmask;
47extern valueT alpha_gp_value;
48
49#define TC_FORCE_RELOCATION(FIXP) alpha_force_relocation (FIXP)
50#define tc_fix_adjustable(FIXP) alpha_fix_adjustable (FIXP)
51#define RELOC_REQUIRES_SYMBOL
ca3f7695 52#define MD_APPLY_FIX3
252b5132
RH
53
54/* This expression evaluates to false if the relocation is for a local
55 object for which we still want to do the relocation at runtime.
56 True if we are willing to perform this relocation while building
57 the .o file. This is only used for pcrel relocations. */
58
59#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
60 ((FIX)->fx_addsy == NULL \
61 || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
62 && ! S_IS_WEAK ((FIX)->fx_addsy) \
63 && S_IS_DEFINED ((FIX)->fx_addsy) \
64 && ! S_IS_COMMON ((FIX)->fx_addsy)))
65
66#define md_convert_frag(b,s,f) as_fatal ("alpha convert_frag\n")
67#define md_estimate_size_before_relax(f,s) \
07726851 68 (as_fatal ("estimate_size_before_relax called"),1)
252b5132
RH
69#define md_operand(x)
70
71#ifdef OBJ_EVAX
72
73/* This field keeps the symbols position in the link section. */
74#define OBJ_SYMFIELD_TYPE valueT
75
76#define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) \
77 fix_new_exp (FRAG, OFF, (int)LEN, EXP, 0, \
78 LEN == 2 ? BFD_RELOC_16 \
79 : LEN == 4 ? BFD_RELOC_32 \
80 : LEN == 8 ? BFD_RELOC_64 \
81 : BFD_RELOC_ALPHA_LINKAGE);
82#endif
83
84#define md_number_to_chars number_to_chars_littleendian
85
86extern int tc_get_register PARAMS ((int frame));
87extern void alpha_frob_ecoff_data PARAMS ((void));
88
89#define tc_frob_label(sym) alpha_define_label (sym)
49309057 90extern void alpha_define_label PARAMS ((symbolS *));
252b5132
RH
91
92#define md_cons_align(nbytes) alpha_cons_align (nbytes)
93extern void alpha_cons_align PARAMS ((int));
94
0a9ef439
RH
95#define HANDLE_ALIGN(fragp) alpha_handle_align (fragp)
96extern void alpha_handle_align PARAMS ((struct frag *));
97
98#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 8)
99
252b5132
RH
100#ifdef OBJ_ECOFF
101#define tc_frob_file_before_adjust() alpha_frob_file_before_adjust ()
102extern void alpha_frob_file_before_adjust PARAMS ((void));
103#endif
104
105#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
106
107#ifdef OBJ_ELF
108#define ELF_TC_SPECIAL_SECTIONS \
109 { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, \
110 { ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
111#endif
43b4c25e
MM
112
113/* Whether to add support for explict !relocation_op!sequence_number. At the
114 moment, only do this for ELF, though ECOFF could use it as well. */
115
116#ifdef OBJ_ELF
117#define RELOC_OP_P
118#endif
119
120#ifdef RELOC_OP_P
121/* Before the relocations are written, reorder them, so that user supplied
122 !lituse relocations follow the appropriate !literal relocations. Also
123 convert the gas-internal relocations to the appropriate linker relocations.
124 */
125#define tc_adjust_symtab() alpha_adjust_symtab ()
126extern void alpha_adjust_symtab PARAMS ((void));
127
128/* New fields for supporting explicit relocations (such as !literal to mark
129 where a pointer is loaded from the global table, and !lituse_base to track
130 all of the normal uses of that pointer). */
131
132#define TC_FIX_TYPE struct alpha_fix_tag
133
134struct alpha_fix_tag
135{
136 struct fix *next_lituse; /* next !lituse */
137 struct alpha_literal_tag *info; /* other members with same sequence */
138};
139
140/* Initialize the TC_FIX_TYPE field. */
141#define TC_INIT_FIX_DATA(fixP) \
142do { \
143 fixP->tc_fix_data.next_lituse = (struct fix *)0; \
144 fixP->tc_fix_data.info = (struct alpha_literal_tag *)0; \
145} while (0)
146
147/* Work with DEBUG5 to print fields in tc_fix_type. */
148#define TC_FIX_DATA_PRINT(stream,fixP) \
149do { \
150 if (fixP->tc_fix_data.info) \
151 fprintf (stderr, "\tinfo = 0x%lx, next_lituse = 0x%lx\n", \
152 (long)fixP->tc_fix_data.info, \
153 (long)fixP->tc_fix_data.next_lituse); \
154} while (0)
155#endif
4dc7ead9
RH
156
157#define DWARF2_LINE_MIN_INSN_LENGTH 4
This page took 0.099707 seconds and 4 git commands to generate.