Add new port: crx-elf
[deliverable/binutils-gdb.git] / gas / config / tc-crx.h
1 /* tc-crx.h -- Header file for tc-crx.c, the CRX GAS port.
2 Copyright 2004 Free Software Foundation, Inc.
3
4 Contributed by Tomer Levi, NSC, Israel.
5 Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
6 Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
7
8 This file is part of GAS, the GNU Assembler.
9
10 GAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
14
15 GAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with GAS; see the file COPYING. If not, write to the
22 Free Software Foundation, 59 Temple Place - Suite 330, Boston,
23 MA 02111-1307, USA. */
24
25 #ifndef TC_CRX_H
26 #define TC_CRX_H
27
28 #define TC_CRX 1
29
30 #define TARGET_BYTES_BIG_ENDIAN 0
31
32 #define TARGET_FORMAT "elf32-crx"
33 #define TARGET_ARCH bfd_arch_crx
34 #define BFD_ARCH bfd_arch_crx
35
36 #define WORKING_DOT_WORD
37 #define NEED_FX_R_TYPE
38 #define LOCAL_LABEL_PREFIX '.'
39
40 #define md_undefined_symbol(s) 0
41 #define md_number_to_chars number_to_chars_littleendian
42
43 /* We do relaxing in the assembler as well as the linker. */
44 extern const struct relax_type md_relax_table[];
45 #define TC_GENERIC_RELAX_TABLE md_relax_table
46
47 /* We do not want to adjust any relocations to make implementation of
48 linker relaxations easier. */
49 #define tc_fix_adjustable(fixP) 0
50
51 /* Fixup debug sections since we will never relax them. */
52 #define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC)
53
54 /* CRX instructions, with operands included, are a multiple
55 of two bytes long. */
56 #define DWARF2_LINE_MIN_INSN_LENGTH 2
57
58 /* This is called by emit_expr when creating a reloc for a cons.
59 We could use the definition there, except that we want to handle
60 the CRX reloc type specially, rather than the BFD_RELOC type. */
61 #define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) \
62 fix_new_exp (FRAG, OFF, (int)LEN, EXP, 0, \
63 LEN == 1 ? BFD_RELOC_CRX_NUM8 \
64 : LEN == 2 ? BFD_RELOC_CRX_NUM16 \
65 : LEN == 4 ? BFD_RELOC_CRX_NUM32 \
66 : BFD_RELOC_NONE);
67
68 #endif /* TC_CRX_H */
This page took 0.057388 seconds and 4 git commands to generate.