]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/config/tc-tic54x.h
merge from gcc
[thirdparty/binutils-gdb.git] / gas / config / tc-tic54x.h
CommitLineData
39bec121 1/* tc-tic54x.h -- Header file for tc-tic54x.c
f7e42eb4 2 Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
39bec121
TW
3 Contributed by Timothy Wall (twall@alum.mit.edu)
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#ifndef _TC_TIC54X_H_
23#define _TC_TIC54X_H_
24
25/* select the proper coff format (see obj-coff.h) */
1dab94dd 26#define TC_TIC54X
39bec121
TW
27
28#define TARGET_BYTES_BIG_ENDIAN 0
29#define OCTETS_PER_BYTE_POWER 1
30
31#define TARGET_ARCH bfd_arch_tic54x
32#define BFD_ARCH TARGET_ARCH
33
34#define WORKING_DOT_WORD 1
35
36#define MAX_OPERANDS 4
37#define PARALLEL_SEPARATOR '|'
38#define LABELS_WITHOUT_COLONS 1
1dab94dd 39/* accept 0FFFFh, 1010b, etc. */
39bec121
TW
40#define NUMBERS_WITH_SUFFIX 1
41/* $ is section program counter */
42#define DOLLAR_DOT 1
43/* accept parallel lines like
1dab94dd 44 add #1,a || ld #1, b
39bec121
TW
45 (may also be split across lines)
46*/
47#define DOUBLEBAR_PARALLEL 1
48/* affects preprocessor */
49#define KEEP_WHITE_AROUND_COLON 1
50
1dab94dd 51/* We need the extra field in the fixup struct to put the relocation in. */
39bec121
TW
52
53#define NEED_FX_R_TYPE
54
55struct bit_info
56{
57 segT seg;
58#define TYPE_SPACE 0
59#define TYPE_BES 1
60#define TYPE_FIELD 2
61 int type;
62 symbolS *sym;
63 valueT value;
64 char *where;
65 int offset;
66};
67
68/* We sometimes need to keep track of bit offsets within words */
69#define TC_FRAG_TYPE int
814f6641 70#define TC_FRAG_INIT(FRAGP) do {(FRAGP)->tc_frag_data = 0;}while (0)
39bec121
TW
71
72/* tell GAS whether the given token is indeed a code label */
73#define TC_START_LABEL_WITHOUT_COLON(c,ptr) tic54x_start_label(c,ptr)
74extern int tic54x_start_label PARAMS((int, char *));
75
76/* custom handling for relocations in cons expressions */
77#define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) tic54x_cons_fix_new(FRAG,OFF,LEN,EXP)
78extern void tic54x_cons_fix_new PARAMS((fragS *,int,int,expressionS *));
79
80/* Define md_number_to_chars as the appropriate standard big endian or
81 little endian function. Mostly littleendian, but longwords and floats are
82 stored MS word first.
83*/
84
85#define md_number_to_chars tic54x_number_to_chars
86extern void tic54x_number_to_chars PARAMS((char *, valueT, int));
87#define tc_adjust_symtab() tic54x_adjust_symtab()
88extern void tic54x_adjust_symtab PARAMS(());
89#define tc_unrecognized_line(ch) tic54x_unrecognized_line(ch)
90extern int tic54x_unrecognized_line PARAMS((int ch));
a8a22e33 91#define md_parse_name(s,e,c) tic54x_parse_name(s,e)
39bec121
TW
92extern int tic54x_parse_name PARAMS((char *name, expressionS *e));
93#define md_undefined_symbol(s) tic54x_undefined_symbol(s)
94extern symbolS *tic54x_undefined_symbol PARAMS((char *name));
95#define md_macro_start() tic54x_macro_start()
96extern void tic54x_macro_start ();
97#define md_macro_end() tic54x_macro_end()
98extern void tic54x_macro_end ();
99#define md_macro_info(args) tic54x_macro_info(args)
100extern void tic54x_macro_info PARAMS((void *macro));
101#define tc_frob_label(sym) tic54x_define_label (sym)
102extern void tic54x_define_label PARAMS((symbolS *));
103
1dab94dd 104#define md_start_line_hook() tic54x_start_line_hook()
39bec121
TW
105extern void tic54x_start_line_hook ();
106
107#define md_estimate_size_before_relax(f,s) \
108tic54x_estimate_size_before_relax(f,s)
109extern int tic54x_estimate_size_before_relax(fragS *, segT);
110
c842b53a 111#define md_relax_frag(seg, f,s) tic54x_relax_frag(f,s)
39bec121
TW
112extern int tic54x_relax_frag(fragS *, long);
113
114#define md_convert_frag(b,s,f) tic54x_convert_frag(b,s,f)
115extern void tic54x_convert_frag(bfd *, segT, fragS *);
116
1dab94dd 117/* Other things we don't support... */
39bec121
TW
118
119/* Define away the call to md_operand in the expression parsing code.
120 This is called whenever the expression parser can't parse the input
1dab94dd 121 and gives the assembler backend a chance to deal with it instead. */
39bec121
TW
122
123#define md_operand(X)
124
125/* spruce up the listing output */
126#define LISTING_WORD_SIZE 2
127
128#endif