* tc_mips.h (MAX_GPREL_OFFSET): Change it to the maximum allowed
[deliverable/binutils-gdb.git] / gas / config / tc-ns32k.h
CommitLineData
252b5132 1/* tc-ns32k.h -- Opcode table for National Semi 32k processor
f7e42eb4
NC
2 Copyright 1987, 1992, 1993, 1994, 1995, 1997, 2000
3 Free Software Foundation, Inc.
252b5132
RH
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_NS32K
23
24#define TARGET_BYTES_BIG_ENDIAN 0
25
26#define TC_PCREL_ADJUST(F) md_pcrel_adjust(F)
27
28#ifdef BFD_ASSEMBLER
29#define NO_RELOC BFD_RELOC_NONE
30
31#define TARGET_ARCH bfd_arch_ns32k
32
33#ifndef TARGET_FORMAT /* Maybe defined in te-*.h */
34#define TARGET_FORMAT "a.out-pc532-mach"
35#endif
36#else
37#define NO_RELOC 0
38#endif
39
40#define LOCAL_LABELS_FB 1
41
42#include "bit_fix.h"
43
44#define tc_aout_pre_write_hook(x) {;} /* not used */
45#define tc_crawl_symbol_chain(a) {;} /* not used */
46#define tc_headers_hook(a) {;} /* not used */
47
48#ifdef SEQUENT_COMPATABILITY
49#define DEF_MODEC 20
50#define DEF_MODEL 21
51#endif
52
53#ifndef DEF_MODEC
54#define DEF_MODEC 20
55#endif
56
57#ifndef DEF_MODEL
58#define DEF_MODEL 20
59#endif
60
61#define MAX_ARGS 4
62#define ARG_LEN 50
63
64#define TC_CONS_FIX_NEW cons_fix_new_ns32k
65extern void fix_new_ns32k_exp PARAMS((fragS *frag,
66 int where,
67 int size,
68 expressionS *exp,
69 int pcrel,
70 int im_disp,
71 bit_fixS *bit_fixP, /* really bit_fixS */
72 int bsr,
73 fragS *opcode_frag,
74 unsigned int opcode_offset));
75
252b5132
RH
76extern void fix_new_ns32k PARAMS ((fragS *frag,
77 int where,
78 int size,
49309057 79 symbolS *add_symbol,
252b5132
RH
80 long offset,
81 int pcrel,
82 int im_disp,
83 bit_fixS *bit_fixP, /* really bit_fixS */
84 int bsr,
85 fragS *opcode_frag,
86 unsigned int opcode_offset));
87
88extern void cons_fix_new_ns32k PARAMS ((fragS *frag,
89 int where,
90 int size,
91 expressionS *exp));
92
93/* the NS32x32 has a non 0 nop instruction which should be used in aligns */
94#define NOP_OPCODE 0xa2
95
96#define md_operand(x)
97
98extern const struct relax_type md_relax_table[];
99#define TC_GENERIC_RELAX_TABLE md_relax_table
100
101#define TC_FRAG_TYPE \
102struct { \
103 fragS *fr_opcode_fragP; \
104 unsigned int fr_opcode_offset; \
105 char fr_bsr; \
106}
107
108#define TC_FRAG_INIT(X) \
109 do \
110 { \
111 frag_opcode_frag (X) = NULL; \
112 frag_opcode_offset (X) = 0; \
113 frag_bsr (X) = 0; \
114 } \
814f6641 115 while (0)
252b5132
RH
116
117/* Accessor macros for things which may move around */
118#define frag_opcode_frag(X) (X)->tc_frag_data.fr_opcode_fragP
119#define frag_opcode_offset(X) (X)->tc_frag_data.fr_opcode_offset
120#define frag_bsr(X) (X)->tc_frag_data.fr_bsr
121
122#define TC_FIX_TYPE \
123struct \
124{ \
125 fragS *opcode_fragP; \
126 unsigned int opcode_offset; \
127 unsigned int bsr : 1; \
128}
129
130/* Accessor macros for things which may move around.
131 See comments in write.h. */
132#define fix_im_disp(X) (X)->fx_im_disp
133#define fix_bit_fixP(X) (X)->fx_bit_fixP
134#define fix_opcode_frag(X) (X)->tc_fix_data.opcode_fragP
135#define fix_opcode_offset(X) (X)->tc_fix_data.opcode_offset
136#define fix_bsr(X) (X)->tc_fix_data.bsr
137
138#define TC_INIT_FIX_DATA(X) \
139 do \
140 { \
141 fix_opcode_frag(X) = NULL; \
142 fix_opcode_offset(X) = 0; \
143 fix_bsr(X) = 0; \
144 } \
814f6641 145 while (0)
252b5132
RH
146
147#define TC_FIX_DATA_PRINT(FILE, FIXP) \
148 do \
149 { \
814f6641 150 fprintf ((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \
252b5132
RH
151 (unsigned long) fix_opcode_frag (FIXP), \
152 fix_opcode_offset (FIXP), \
153 fix_bsr (FIXP)); \
154 } \
814f6641 155 while (0)
This page took 0.090126 seconds and 4 git commands to generate.