Fix typos
[deliverable/binutils-gdb.git] / gas / config / tc-ns32k.h
CommitLineData
252b5132 1/* tc-ns32k.h -- Opcode table for National Semi 32k processor
49309057 2 Copyright (C) 1987, 92, 93, 94, 95, 97, 1999 Free Software Foundation, Inc.
252b5132
RH
3
4 This file is part of GAS, the GNU Assembler.
5
6 GAS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GAS is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GAS; see the file COPYING. If not, write to the Free
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA. */
20
21#define TC_NS32K
22
23#define TARGET_BYTES_BIG_ENDIAN 0
24
25#define TC_PCREL_ADJUST(F) md_pcrel_adjust(F)
26
27#ifdef BFD_ASSEMBLER
28#define NO_RELOC BFD_RELOC_NONE
29
30#define TARGET_ARCH bfd_arch_ns32k
31
32#ifndef TARGET_FORMAT /* Maybe defined in te-*.h */
33#define TARGET_FORMAT "a.out-pc532-mach"
34#endif
35#else
36#define NO_RELOC 0
37#endif
38
39#define LOCAL_LABELS_FB 1
40
41#include "bit_fix.h"
42
43#define tc_aout_pre_write_hook(x) {;} /* not used */
44#define tc_crawl_symbol_chain(a) {;} /* not used */
45#define tc_headers_hook(a) {;} /* not used */
46
47#ifdef SEQUENT_COMPATABILITY
48#define DEF_MODEC 20
49#define DEF_MODEL 21
50#endif
51
52#ifndef DEF_MODEC
53#define DEF_MODEC 20
54#endif
55
56#ifndef DEF_MODEL
57#define DEF_MODEL 20
58#endif
59
60#define MAX_ARGS 4
61#define ARG_LEN 50
62
63#define TC_CONS_FIX_NEW cons_fix_new_ns32k
64extern void fix_new_ns32k_exp PARAMS((fragS *frag,
65 int where,
66 int size,
67 expressionS *exp,
68 int pcrel,
69 int im_disp,
70 bit_fixS *bit_fixP, /* really bit_fixS */
71 int bsr,
72 fragS *opcode_frag,
73 unsigned int opcode_offset));
74
252b5132
RH
75extern void fix_new_ns32k PARAMS ((fragS *frag,
76 int where,
77 int size,
49309057 78 symbolS *add_symbol,
252b5132
RH
79 long offset,
80 int pcrel,
81 int im_disp,
82 bit_fixS *bit_fixP, /* really bit_fixS */
83 int bsr,
84 fragS *opcode_frag,
85 unsigned int opcode_offset));
86
87extern void cons_fix_new_ns32k PARAMS ((fragS *frag,
88 int where,
89 int size,
90 expressionS *exp));
91
92/* the NS32x32 has a non 0 nop instruction which should be used in aligns */
93#define NOP_OPCODE 0xa2
94
95#define md_operand(x)
96
97extern const struct relax_type md_relax_table[];
98#define TC_GENERIC_RELAX_TABLE md_relax_table
99
100#define TC_FRAG_TYPE \
101struct { \
102 fragS *fr_opcode_fragP; \
103 unsigned int fr_opcode_offset; \
104 char fr_bsr; \
105}
106
107#define TC_FRAG_INIT(X) \
108 do \
109 { \
110 frag_opcode_frag (X) = NULL; \
111 frag_opcode_offset (X) = 0; \
112 frag_bsr (X) = 0; \
113 } \
814f6641 114 while (0)
252b5132
RH
115
116/* Accessor macros for things which may move around */
117#define frag_opcode_frag(X) (X)->tc_frag_data.fr_opcode_fragP
118#define frag_opcode_offset(X) (X)->tc_frag_data.fr_opcode_offset
119#define frag_bsr(X) (X)->tc_frag_data.fr_bsr
120
121#define TC_FIX_TYPE \
122struct \
123{ \
124 fragS *opcode_fragP; \
125 unsigned int opcode_offset; \
126 unsigned int bsr : 1; \
127}
128
129/* Accessor macros for things which may move around.
130 See comments in write.h. */
131#define fix_im_disp(X) (X)->fx_im_disp
132#define fix_bit_fixP(X) (X)->fx_bit_fixP
133#define fix_opcode_frag(X) (X)->tc_fix_data.opcode_fragP
134#define fix_opcode_offset(X) (X)->tc_fix_data.opcode_offset
135#define fix_bsr(X) (X)->tc_fix_data.bsr
136
137#define TC_INIT_FIX_DATA(X) \
138 do \
139 { \
140 fix_opcode_frag(X) = NULL; \
141 fix_opcode_offset(X) = 0; \
142 fix_bsr(X) = 0; \
143 } \
814f6641 144 while (0)
252b5132
RH
145
146#define TC_FIX_DATA_PRINT(FILE, FIXP) \
147 do \
148 { \
814f6641 149 fprintf ((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \
252b5132
RH
150 (unsigned long) fix_opcode_frag (FIXP), \
151 fix_opcode_offset (FIXP), \
152 fix_bsr (FIXP)); \
153 } \
814f6641 154 while (0)
This page took 0.074455 seconds and 4 git commands to generate.