]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/config/tc-tic54x.h
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / gas / config / tc-tic54x.h
CommitLineData
39bec121 1/* tc-tic54x.h -- Header file for tc-tic54x.c
250d07de 2 Copyright (C) 1999-2021 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
ec2655a6 9 the Free Software Foundation; either version 3, or (at your option)
39bec121
TW
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
4b4da160
NC
19 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20 02110-1301, USA. */
39bec121
TW
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
39bec121
TW
32
33#define WORKING_DOT_WORD 1
34
35#define MAX_OPERANDS 4
36#define PARALLEL_SEPARATOR '|'
37#define LABELS_WITHOUT_COLONS 1
12c4b9aa
AM
38#undef LOCAL_LABELS_FB
39
1dab94dd 40/* accept 0FFFFh, 1010b, etc. */
39bec121
TW
41#define NUMBERS_WITH_SUFFIX 1
42/* $ is section program counter */
43#define DOLLAR_DOT 1
44/* accept parallel lines like
1dab94dd 45 add #1,a || ld #1, b
39bec121
TW
46 (may also be split across lines)
47*/
48#define DOUBLEBAR_PARALLEL 1
49/* affects preprocessor */
50#define KEEP_WHITE_AROUND_COLON 1
51
39bec121
TW
52struct bit_info
53{
54 segT seg;
55#define TYPE_SPACE 0
56#define TYPE_BES 1
57#define TYPE_FIELD 2
58 int type;
59 symbolS *sym;
60 valueT value;
61 char *where;
62 int offset;
63};
64
65/* We sometimes need to keep track of bit offsets within words */
66#define TC_FRAG_TYPE int
db222310 67#define TC_FRAG_INIT(FRAGP, MAX_BYTES) do {(FRAGP)->tc_frag_data = 0;}while (0)
39bec121 68
3076e594
NC
69/* Tell GAS whether the given token is indeed a code label.
70 Note - we make of the knowledge that this macro will be called from
71 read.c:read_a_source_file() in that we also pass the local variable
72 line_start. */
2e57ce7b 73#define TC_START_LABEL_WITHOUT_COLON(NUL_CHAR, NEXT_CHAR) \
3076e594
NC
74 tic54x_start_label (line_start, NUL_CHAR, NEXT_CHAR)
75extern int tic54x_start_label (char *, int, int);
39bec121
TW
76
77/* custom handling for relocations in cons expressions */
62ebcb5c
AM
78#define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP, RELOC) \
79 tic54x_cons_fix_new (FRAG, OFF, LEN, EXP, RELOC)
80extern void tic54x_cons_fix_new (fragS *, int, int, expressionS *,
81 bfd_reloc_code_real_type);
39bec121
TW
82
83/* Define md_number_to_chars as the appropriate standard big endian or
84 little endian function. Mostly littleendian, but longwords and floats are
85 stored MS word first.
86*/
87
88#define md_number_to_chars tic54x_number_to_chars
6e917903 89extern void tic54x_number_to_chars (char *, valueT, int);
39bec121 90#define tc_adjust_symtab() tic54x_adjust_symtab()
6e917903 91extern void tic54x_adjust_symtab (void);
39bec121 92#define tc_unrecognized_line(ch) tic54x_unrecognized_line(ch)
6e917903 93extern int tic54x_unrecognized_line (int ch);
9497f5ac 94#define md_parse_name(s,e,m,c) tic54x_parse_name(s,e)
6e917903 95extern int tic54x_parse_name (char *name, expressionS *e);
39bec121 96#define md_undefined_symbol(s) tic54x_undefined_symbol(s)
6e917903 97extern symbolS *tic54x_undefined_symbol (char *name);
39bec121 98#define md_macro_start() tic54x_macro_start()
6e917903 99extern void tic54x_macro_start (void);
39bec121 100#define md_macro_end() tic54x_macro_end()
6e917903 101extern void tic54x_macro_end (void);
39bec121 102#define md_macro_info(args) tic54x_macro_info(args)
4962e196 103struct macro_struct;
5a49b8ac 104extern void tic54x_macro_info (const struct macro_struct *);
39bec121 105#define tc_frob_label(sym) tic54x_define_label (sym)
5a49b8ac 106extern void tic54x_define_label (symbolS *);
39bec121 107
1dab94dd 108#define md_start_line_hook() tic54x_start_line_hook()
6e917903 109extern void tic54x_start_line_hook (void);
39bec121
TW
110
111#define md_estimate_size_before_relax(f,s) \
112tic54x_estimate_size_before_relax(f,s)
113extern int tic54x_estimate_size_before_relax(fragS *, segT);
114
c842b53a 115#define md_relax_frag(seg, f,s) tic54x_relax_frag(f,s)
39bec121
TW
116extern int tic54x_relax_frag(fragS *, long);
117
118#define md_convert_frag(b,s,f) tic54x_convert_frag(b,s,f)
119extern void tic54x_convert_frag(bfd *, segT, fragS *);
120
1dab94dd 121/* Other things we don't support... */
39bec121
TW
122
123/* Define away the call to md_operand in the expression parsing code.
124 This is called whenever the expression parser can't parse the input
1dab94dd 125 and gives the assembler backend a chance to deal with it instead. */
39bec121
TW
126
127#define md_operand(X)
128
129/* spruce up the listing output */
130#define LISTING_WORD_SIZE 2
131
6e917903
TW
132extern void tic54x_global (int);
133
39bec121 134#endif